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. 

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now