SQL Server Database Mail cannot send email smtp.office365.com
Hi, I try to use SQL Server Database Mail, and I get this error:
The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 7 (2025-04-02T16:57:33). Exception Message: Cannot send mails to mail server. (Error in processing. The server response was: 5.7.3 STARTTLS is required to send mail [LO4P265CA0007.GBRP265.PROD.OUTLOOK.COM 2025-04-02T11:27:32.964Z 08DD7161F6BFCBDA]).).
The configuration I use is:
Server: smtp.office365.com
Port Number: 587
Authentication: Basic (An email address and password)
I am able to telnet from the server to smtp.office365.com on port 587.
I can send email within my organization but getting this error only while sending email to outside world.