Skip to main content
Our Tech Ideas

Resolving Failed Database Mail Issues with TLS 1.2

Introduction

Have you ever been frustrated because your database emails failed to send? You’re certainly not alone! I received multiple calls between June 5th and June 9th from various sources reporting problems with their database mail systems. In this blog article, I’ll explain the simple method that fixed these TLS 1.2 issues and made everyone happy.

Identifying the Problem

Initially, I advised all to perform routine checks on their database mail configurations. However, to our disappointment, this didn’t solve the problem. Determined to find a solution, I delved deeper into the issue.

The Common key

Curiously, all the individuals experiencing issues with their database emails were using the same SMTP service, which happened to be SendGrid. Armed with this knowledge, I proposed a possible solution.

Support for TLS 1.2

After google search, we found that “Twilio SendGrid will support TLS connections using only TLS 1.2 and higher beginning June 5, 2023”. Ref. https://docs.sendgrid.com

The Simple Solution

I advised, with a smile, that they verify their server’s TLS settings and confirm that TLS 1.2 is enabled. TLS 1.2 was deactivated in some situations, resulting in the failed database email issue. The problem was fixed by enabling this setting, and everyone involved breathed a sigh of relief.

How to check if TLS 1.2 is enabled?

If the registry key

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Client\

Is disabled by default then, its value should be set to 0.

Similarly, if the registry key

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Client\

is enabled then, its value should be set to 1.

I will suggest to change both Client and Server TLS 1.2 on Server where SQL Server is running.

Ref. https://learn.microsoft.com/

Step 01

Step 02

TLS

If even after enabling TLS 1.2 db mail fail to send mail, then restart SQL Service.

Conclusion

Troubleshooting database email difficulties might be difficult, yet the solution is sometimes simpler than we believe. SendGrid’s policy modification was the source of the problem in this scenario. We were able to efficiently repair the problem and restore the smooth operation of database emails by identifying the common SMTP service and recommended the activation of TLS 1.2.

Remember, when facing similar challenges, it’s important to dig deeper and explore all possible causes before reaching a solution. It’s often the simplest adjustments that make the biggest difference. Happy emailing! Hope this post will help you.