Hi Mark.
I have started to work with email. These are my definitions in the program:
config.h:
#define OUR_USER_DOMAIN "my_domain.com"
#define DEFAULT_DESTINATION_EMAIL_ADDRESS "evgenik@sysmop.com"
#define SMTP_PROVIDER_IP_ADDRESS { 194,158,229,11 }
#define SMTP_PROVIDER_ADDRESS "mail.provider.com"
application.c:
static const NETWORK_PARAMETERS network_default = {
(AUTO_NEGOTIATE | FULL_DUPLEX | RX_FLOW_CONTROL), // usNetworkOptions - see driver.h for other possibilities
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // ucOurMAC - when no other value can be read from parameters this will be used
{ 192, 168, 10, 233 }, // ucOurIP - our default IP address
{ 255, 255, 255, 0 }, // ucNetMask - Our default network mask
{ 192, 168, 0, 1 }, // ucDefGW - Our default gateway
{ 192, 168, 10, 1 }, // ucDNS_server - Our default DNS server
};
...
#ifdef SMTP_PARAMETERS
{'U', 's', 'e', 'r', ' ', 'n', 'a', 'm', 'e', 0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{'P', 'a', 's', 's', ' ', 'w', 'o', 'r', 'd', 0,0},
{'M', 'y', 'A', 'd', 'd', 'r', 'e', 's', 's', '@', 'u', 'T', 'a', 's', 'k', 'e', 'r', '.', 'c', 'o', 'm', 0,0,0,0,0,0,0,0,0,0},
{'m', 'a', 'i', 'l', '.', 'p', 'r', 'o', 'v', 'i', 'd', 'e', 'r', '.', 'c', 'o', 'm', 0,0,0,0,0,0,0,0,0,0,0,0,0,0},
unsigned char ucSMTP_server[] = SMTP_PROVIDER_IP_ADDRESS;
app_hw_m5223x.h
#define SENDERS_EMAIL_ADDRESS "M52235EVB@uTasker.com" // fictional Email address of the board being used
#define EMAIL_SUBJECT "M52235EVB Test" // Email subject
#define EMAIL_CONTENT "Hello!!\r\nThis is an email message from evgenik.\r\nI hope that you have received this test and have fun using the uTasker operating system with integrated TCP/IP stack.\r\r\nRegards evgenik!!";
#define SMTP_ACCOUNT_NAME "smtp_user"
#define SMTP_PASSWORD "smtp_password"
I am not assured what data to me it is necessary to bring in these parameters. For example: SMTP_ACCOUNT_NAME and SMTP_PASSWORD must be at the same as in the PARs struct values (cUserName[8] and cUserPass[8]) or SMTP_PROVIDER_IP_ADDRESS value?
Help me to understand with it please.
Thanks.
Evgeni.