I was able to send email using telnet.
I was unable to send it using the library function. I put it in the web code, it hung up the loading of the page for about 10 seconds, then returned a 0 (no error) but I did not get any mail.
I have two netburner MOD 5270 modules mounted on DEV-70 boards that have the two serial ports and so on. I use one to control an online model RR and the other for the Geiger counter. I would like to get the geiger counter to send an email if the radiation picks up. To get support (at $99 a year) I need the serial number but don't see one on the box or on the circuit board - I may have lost it somehow.
char var_user[80] = "
Vlermond@cttestset.com";
char var_pass[80] = "mypassword";
// not actual password
char var_svrip[80] = "66.147.242.85";
char var_from[80] = "
vernon@cttestset.net";
char var_to[80] = "
vernon@cttestset.com";
char var_sub[80] = "FROM:
vernon@cttestset.com\015\012 TO:
vernon@cttestset.com\015\012 subject: testing\015\012";
// the server requires a FROM and TO separated by a cr/lf that must
match the mail to and rcpt values. I put that in the subject.
// if you don't do this in telnet you get a 550 administrative error.
char var_body[80]= "this is a test, it is only a test";
int SendmailResult;
int DNSResult;
// then as the web page loads:
// I have tried this different ways, I commented the DNS result out
//and put it in. I just did IPADDR SMTP_server; with no number.
SMTP_PORT = 26;
IPADDR SMTP_server = 0x4293f255;
// converted IP to hexadecimal just to try that - don't know if this
//is right ??
DNSResult = GetHostByName( var_svrip, &SMTP_server, 0,
TICKS_PER_SECOND * 20 );
SendmailResult = SendMailAuth( SMTP_server, var_user, var_pass,
var_from, var_to, var_sub, var_body );
I print the SendmailResult at the bottom of the web page when testing
this and it reads zero. Note that I don't need to use DNS - I can log
in with my IP address and port number and would like to do that.