Page 1 of 1

SMTP fix data header

PostPosted: Fri Aug 30, 2013 10:23 am
by ToddG
In order to get the SMTP and SMS working I had to update the email header to include the TO and FROM elements. This is not the same as RCTP TO and MAIL FROM. This was required by TimeWarner RoadRunner (and potentially other providers) to make it work. The following bolded code was added to the notifyViaEmail function (which is around line 300).
...
smtpClient.println(F("HELO relay.mydooropener.com"));

smtpClient.print(F("MAIL FROM:"));
smtpClient.println(F("noreply@mydooropener.com"));

smtpClient.print(F("RCPT TO:"));
smtpClient.println(to);

smtpClient.println(F("DATA"));

smtpClient.print(F("SUBJECT: "));
smtpClient.println(subject);

// Added the following to email header as required by some ISP such as RoadRunner.
// 8-30-2013 TSG
smtpClient.print(F("TO: "));
smtpClient.println(to);
smtpClient.print(F("FROM: "));
smtpClient.println(F("noreply@mydooropener.com"));
// End TSG Change

smtpClient.println();

smtpClient.print(body);
smtpClient.print(F(" "));
smtpClient.println(F("mydooropener://status"));
...

Re: SMTP fix data header

PostPosted: Fri Aug 30, 2013 8:15 pm
by support
Thanks for sharing Todd. Appreciated!