Main Page   Modules   Data Structures   File List   Data Fields   Globals   Related Pages   Examples  

adds/app/mail

Explain how to use mail function.

 #include <pro/mail.h>
 #include <sys/eepromconf.h>
 char mailto[100];
 char subject[100];
 char body[100];
 
 //load mail config from eeprom
 MailLoadConfig();
 *  .
 *  .
 //init eth
 *  .
 *  .

 //Prepare emial
 strcpy(mailto, "info@propox.com");
 strcpy(subject, "funny mail");
 strcpy(body, "null");

 // Send email
 if (SendMail (mailto, subject, body) == 1)
 NutPrintFormat (0, "Mail sent successfully\r\n");
 else
 NutPrintFormat (0, "Error !\r\n");

 //for change mail config
 confmail.serv_addr = inet_addr ("192.168.200.254");
 strcpy(confmail.sender, "somebody@propox.com");
 MailSaveConfig()


Generated on Thu Jan 30 22:30:43 2003 for EduNet by doxygen1.2.18