Listing 2—Super simple.
All I had to do was fill in the blanks, specify that I wanted to run the SMTP
example code, and kick off the LAN buggy. Almost all of the groundwork necessary
to support SMTP already had been done in the initial CMX-MicroNet set-up phase.******************************************************************
// From mnconfig.h
******************************************************************
/* SMTP */
#define SMTP 1
#define SMTP_BUFFER_LEN 64
******************************************************************
// From the CMX-MicroNet example code
******************************************************************
byte from[] = “fred@edtp.com”;
byte to[] = “support@edtp.com”;
byte subject[] = “PIC18F8621 SMTP Test”;
byte message[] = “The email sent from a PIC18F8621 using CMX MicroNet.\r\n”;
byte attach[] = “CMX MicroNet sends attachments too!\r\n”;
byte fname[] = “micronet.txt”;
******************************************************************
// From the CALLBACK.c
******************************************************************
byte gateway_ip_addr[IP_ADDR_LEN] = { 192,168,0,1 };
byte subnet_mask[IP_ADDR_LEN] = { 255,255,255,0 };
#if (SMTP)
/* replace the ip address below with the ip address of your SMTP server */
byte ip_smtp_addr[IP_ADDR_LEN] = {65,32,5,130};
#endif /* (SMTP) */