Most likely this is due to the new TLS 1.2 requirement in office365.com being turned on for your account.
Please see:
https://learn.microsoft.com/en-us/microsoft-365/compliance/prepare-tls-1.2-in-office-365?view=o365-worldwide
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi everybody,
I have SQL Server with Database mail sending emails by Office 365 administered by client.
SQL is configured to use SSL, smtp.office365.com and port 587, account name and correct password.
It was working perfect, but few days ago sending stopped. I investigate that now smtp.office365.com needs STARTTLS command do relay mails.
What have to be done on Office365 connecor or what you suggest to chage on SQL Server database mail to allow use Office365?
Most likely this is due to the new TLS 1.2 requirement in office365.com being turned on for your account.
Please see:
https://learn.microsoft.com/en-us/microsoft-365/compliance/prepare-tls-1.2-in-office-365?view=o365-worldwide
I think it's not a TLS 1.2 problem (I can send mails using email application with STARTTLS options from this server, but it not works with TLS, as in SQL is possible to configure - ony one allowed option). I tried using email application with test server with TLS 1.2 as only possible protocol- the same results. I suppose, settings on Office365 was changed, but I can't confirm that and I'm not familiar with Office365 administration.
What version of SQL Server are you using?
There are issues with supporting TLS 1.2 when using eg SQL Server 2016 (based on the .NET build runtime version)
SQL 2017, but it appears with email clients like ThunderBird: STARTTLS works, TLS not (the same settings as Database mail).
Hi @Krzysztof Cybula ,
Did you check the "This server requires a secure connection (SSL)" option during configure DB mail? This must be ticked to enable the STARTTLS command that establishes a secure communications channel over which SMTP Basic authentication gets sent. Please check the detail suggestion information from this old thread.
Please also check if below blog could help you.
SQL Server Database Mail Failure Troubleshooting & Two Common Issues
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".