Hello:
I'm ussing this rutine to sends an e-mail
//---------------------------------------------------------------------
void SendMensPrueba()
//---------------------------------------------------------------------
{
char BodyMens[20];
char DirSep[71];
while (isCoRunning(&cSendMail)==1){
}
strcpy(BodyMens,"Mensaje de Prueba");
strcpy(DirSep,config.wDestMensCrit);
#ifdef USE_SMTP_AUTH
smtp_setauth (config.wsmtpcuentaval,config.wsmtppass);
#endif
smtp_setserver(config.wsmtpsrvr);
direnvio=strtok(DirSep, ";");
while (direnvio!=NULL) {
smtp_sendmail(direnvio,config.wsmtpmailfrom,config.wAsunto,BodyMens);
while(smtp_mailtick()==SMTP_PENDING){
}
if(smtp_status()==SMTP_SUCCESS){
printf("\n\r\Message sent\n\r");
strcpy(wMailStatus," Ultimo e-mail enviado OK ");
}else{
strcpy(wMailStatus," Ultimo e-mail con errores ");
if(smtp_status()==SMTP_UNEXPECTED)
printf("\n\r\Error INESPERADO \n\r");
else
printf("\n\r\Error sending message\n\r");
}
direnvio=strtok(NULL, ";");
}
}
It works very whell, . It send an e-mail to all address writed into
direnvio (separated by ;).
But I can not use a name (smtp.mailserver.com.ar for example) in the
smtp field (config.wsmtpsrvr). I need use an IP address.
I have configurated the lan parameters with.
ifconfig(IF_ETH0, IFS_IPADDR, aton(config.wdirip),
IFS_NETMASK, aton(config.wmask),
IFS_ROUTER_SET, aton(config.wrouter),
IFS_NAMESERVER_SET, aton(config.wdnssrvr),
IFS_UP,
IFS_END);
All config.xxx parameters are char variables and work whell.
Why the name for smtp is not resolved ? Have you some idea.
I have test this configuration in anothers lans with the same results.
Thank you in advance.
------------------------------------

(You need to be a member of rabbit-semi -- send a blank email to rabbit-semi-subscribe@yahoogroups.com )