Guidance on email using Synapse and SMTPsend lazarus / 38-Networking and Web Programming ---------------------------------------------------------------------- Curt Carpenter · 2024-10-30 20:05 I need to send some instrument readings to an email address every two or three hours, and have been trying to get Example 4 of of the Synapse Email examples (https://wiki.lazarus.freepascal.org/Synapse_- _Email_Examples) to work.  o  I can compile the example and execute it through "SMTP Login: OK', but I get a bunch of errors thereafter as shown here: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i SMTP Login: OK-- Remote response: SMTP: outbound.att.net supports ESMTPSMTP ERROR: MailFrom:???-Other undefined StatusSMTP ERROR: MailTo:???-Other undefined StatusSMTP ERROR: MailData:???-Other undefined StatusSMTP ERROR: Logout:???-Other undefined Status  o  When I try to step into the Synapse SMTPsend unit's MailFrom function, get the error Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i "Project project1 raised exception class 'External: Unknown exception code 13'. At address B7F41D09  Any thoughts on why I can't step into SMPTsend code would be gratefully appreciated -- as would any other ideas on what I'm doing wrong in general.  I've never tried to do anything with the internet or Synapse before so don't really know what I'm doing.  The "SMTP login: OK" seems to indicate that something is working but I can't seem to get anywhere with debugging the problems on my own. Thanks. ---------------------------------------------------------------------- rvk · 2024-10-31 08:56 SMTP errorcode 13 seems to indicate "Permission denied (13)". Did you try the exact example with: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i SMTP.MailFrom(MailFrom, Length(MailFrom)) You might want to change that in this and see if it helps. Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i SMTP.MailFrom(MailFrom, 0) Also... in case of error you could also try to print SMTP.FullResult[0] just to see if there is data in it. So something like: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i if not SMTP.MailFrom(MailFrom, 0) thenbegin  Form1.Memo1.Append('SMTP ERROR: MailFrom:' + SMTP.EnhCodeString);  Form1.Memo1.append('-- Remote response: ' + SMTP.FullResult.Text);endelsebegin  Form1.Memo1.Append('SMTP MailFrom: OK');  Form1.Memo1.append('-- Remote response: ' + SMTP.FullResult[0]);end; BTW. The Size parameter for SMTP.MailFrom() should NEVER be the size of the From address. It should be the size of the entire mail or 0 (if the server can determine this itself). This is a really common made mistake. ---------------------------------------------------------------------- Curt Carpenter · 2024-10-31 15:22 Thanks very much for the help rvk -- I'll try the length and full response changes this morning.