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 = "smtp.office365.com"
   semail.port = 587
   semail.strUserName = "user@domain"
   semail.strPassword = "private"
   semail.strAuthenticate = "Auto"  //"NoLogin", "AuthLogin", "LoginPlain
   semail.strBody = "Test"
   semail.strReplyAddress = "support@domain.com"
   semail.strReplyName = "Support"
   semail.strSubject = "Tst Sub"
   semail.strTo = "myuser@domin.com"
   semail.strConnectionType = "STARTTLS" //"PlainText", "SSL_TLS", "STARTTLS", "AutoUpgradeToSTARTTLS".
   semail.strSSLProtocol = "TLSv1_2" //, "TLSv1", "TLSv1_1", "TLSv1_2", "DTLSv1" "SSLv2orv3"
   semail.Send()
 
No errors are returned, but no email is received either. 
 
Thanks
Link to comment
Share on other sites

Archived

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