Re: RE: Change port SMTP at execution time

Tom Collins <tom-lnEA/wrDJtNWk0Htik3J/[email protected]>
Newsgroups gmane.comp.hardware.rabbit-semiconductor
Message-ID <[email protected]>
If there are other macros that you'd typically set with a string (like a "dotted quad" IP address), you can use the same technique:

char some_ip[16];
#define SOME_IP some_ip

And later in code, you can sprintf(), inet_ntoa() or strcpy() an address in.

-Tom


On Sep 15, 2013, at 5:42 PM, <[email protected]> wrote:

> 
> One question: as I can do the same but with an IP number (eg 192.168.1.100)
> 
> Thank you! 
> 
> 
> 
> --- In [email protected], <inecoiec@...> wrote:
> 
> ¡Gracias! Tom 
> su trabajo!
> 
> 
> 
> --- En [email protected] , Tom Collins <tom@...> escribió: 
> > 
> > unsigned int smtp_port = 25; 
> > # define smtp_port smtp_port 
> > 
> > Ahora su código puede cambiar el valor de la variable global " . smtp_port "cada vez que tiene que cambiar la configuración del puerto 
> > 
> >-Tom 
> > 
> > 
> > el 1 abr 2012, a las 11:42 AM, OmarP escribió: 
> > 
> >> Hola, 
> >> Tengo un controlador que enviar un e-mail cuando un evento está presente. 
> >> Se tienen algunas páginas Zhtml para establecer algunos parámetros (el servidor SMTP, el addrress enviar el e-mail, etc). 
> >> 
> >> Me gustaría que el usuario puede cambiar el smtp_port también. 
> > > 
> >> ¿Hay alguna forma de hacer esto?. 
> >> 
> >> Yo uso 
> >> # define smtp_port xxxx 
> >> 
> >> / / y luego 
> >> 
> >> # ifdef smtp_port 
> >>,, 
> , >> , ,,, 
> >> 
> >> pero necesito cambiar el número de puerto en tiempo de compilación 
> >> 
> >> ¿Hay alguna forma de cambiar el smtp_port en el momento excecution?. 
> >> 
> >> gracias de antemano 
> >> saludos! 
> >> 
> >> 
> >
> 
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.