I have been puzzled by this issue for almost 1 week. Hopefully someone in our community has experienced the same issue and already found a solution.
So here is my problem:
As per our company policy, we want database mail to be able to send emails over port 25 with TLS 1.2 enabled and with TLS 1.0 & TLS 1.1 disabled.
Our mail server is Exchange Server 2010, our SQL Server 2016 (Developer and Enterprise editions) boxes have OS of Windows Server 2016 Standard editions.
Our SQL Server version is:
select @@version
----------------------------------------
Microsoft SQL Server 2016 (SP1-CU7-GDR) (KB4057119) - 13.0.4466.4 (X64)
Dec 22 2017 11:25:00
Copyright (c) Microsoft Corporation
Developer Edition (64-bit) on Windows Server 2016 Datacenter 10.0 <X64> (Build 14393: ) (Hypervisor)
We have the DB mail configuration as shown here.
The issue is whenever we turn on SSL
use msdb
exec dbo.sysmail_update_account_sp @account_id=2, @enable_ssl = 1;
We CANNOT send db mail (no matter whether our SMTP authentication is Windows Authentication, Basic authentication or Anonymous Authentication). The error message in db mail log is as follows:
Message
The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 2 (2018-07-30T10:52:41). Exception Message: Cannot send mails to mail server. (Failure sending mail.). )
But if we turn off this SSL, there is no problem for db mail sent out.
So how can we enable SSL and uses TLS 1.2 for db mail?
I have enabled TLS 1.2 by adding registry as shown below
The details is from this link (see the FAQ section)


sysmail_faileditemswas:Sending Mail using Account (Number) (Date). Exception Message: Cannot send mails to mail server. (Failure sending mail.).. It appeared to be random; sometimes the email has been sent and sometimes it has not. After applying this solution we did not experience any issue. – rasso Jan 28 '22 at 06:55Error was: "The mail could not be sent to the recipients because of the mail server failure. Exception Message: Cannot send mails to mail server. (Failure sending mail.)"
Adding this registry information and then right clicking SQL Agent in SSMS and restarting was enough to get Database Mail to work again (vs having to immediately reboot or restart all SQL services). Hope this helps someone else...
– tb1 Feb 01 '22 at 19:37