I would like to use my Office365 email account for sending forum emails, but I've got an error The selected mail encryption is invalid..

Here's the POP, IMAP, and SMTP settings by Microsoft Support.

Here's my setting:

  • Host: smtp.office365.com
  • Port: 587
  • Encryption: starttls
  • Username: noreply@domain.tld
  • Password: ***********

How do I fix this issue?

    Just a note for those who have met the same problem and found this post:

    tls works well as the encryption setting, and you should enable Authenticated SMTP in Microsoft 365 admin center -> Users -> Mail -> Manage email apps. This worked for me. 😃

      katos Make sure you have legacy authentication turned on. By default all newer installs don't have legacy auth turned on. And in some cases Microsoft will actually force modern authentication. Also if your using MFA make sure to use an app password.

      katos I did not change anything to my ACP settings (I actually don't know how to change it). By the way, just to make sure, what I did works for the "Enterprise" version of Microsoft 365 (E3/E5 subscription, and I'm currently using an E5 developer subscription​), which the account finishes with @ our own domain, not @outlook.com or @hotmail.com.