Listing 1—The HI-TECH PICC-18 C compiler statements use the same naming convention as the Microchip PIC datasheets. This makes it easy to read and write code with the PICC-18 C compiler. I didn’t have to change a thing. The Easy Ethernet W/PIC18 I/O pin definitions are exactly what CMX-MicroNet wants to see out of the box.
******************************************************************
// 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) */