Emailing with Office365

Recommended Posts

I have been unsuccessful using office365 to send emails.  I am using the code shown in the users manual for gmail.  It works fine in gmail but does not work in office365 (with the appropriate changes, ie, host, user, password, etc).  Has anyone had any luck using office365 as a relay?

   Private semail = new(CEMail)

   semail.strhost = ""
   semail.port = 587
   semail.strUserName = "user@domain"
   semail.strPassword = "private"
   semail.strAuthenticate = "Auto"  //"NoLogin", "AuthLogin", "LoginPlain
   semail.strBody = "Test"
   semail.strReplyAddress = ""
   semail.strReplyName = "Support"
   semail.strSubject = "Tst Sub"
   semail.strTo = ""
   semail.strConnectionType = "STARTTLS" //"PlainText", "SSL_TLS", "STARTTLS", "AutoUpgradeToSTARTTLS".
   semail.strSSLProtocol = "TLSv1_2" //, "TLSv1", "TLSv1_1", "TLSv1_2", "DTLSv1" "SSLv2orv3"
No errors are returned, but no email is received either. 
Link to comment
Share on other sites


This topic is now archived and is closed to further replies.