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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.