Troubleshooting Database Mail on SQL Server 2016

tl/dr – Install the .NET Framework 3.5 feature on your server

I was setting up a new SQL Server 2016 machine today and going through the normal configurations – setting permissions, setting backup/data locations, configuring database mail for alerts, and such.  I had no issues until I started testing database mail and getting … nothing.  No emails received, nothing in the logs, a vague hint that there were 3 pending entries in an external queue, but overall – nothing. I hit the MS Troubleshooting page for DB Mail and verified my configuration was correct. I tested connectivity to the SMTP server, verified the firewall settings, and even TELNET’d to the box.

I finally pulled up Sean McCown’s Troubleshooting Guide for DB Mail and started stepping through it.  I got to the “run the DatabaseMail.exe app” step and was then greeted by a big message telling me that the .NET Framework v3.5 couldn’t be installed.  That rang several bells and I remember reading before that SQL Server 2016 still required .NET 3.5 in order to use DB Mail. I added the feature and kicked off the app again just to see if that would work. No errors and all queued mails were received shortly afterwards.

Quick thanks to Sean for the very thorough guide, complete with examples, and for pointing me in the right direction. I definitely will remember this for the next 2016 server I need to configure and will make sure our Ops team adds the framework as part of their server config scripts for SQL Server.

Advertisements

One thought on “Troubleshooting Database Mail on SQL Server 2016

  1. We just had exactly the same problem, and Database Mail was fixed by installing .Net Framework 3.5.

    Database Mail stopped working when I installed “Important Update for SQL Server 2016 SP1 Reporting Services (KB3207512)”. Well, it certainly stopped at the same time as it was installed.

    Bit worrying that Microsoft seems to have gone backwards on their latest release.

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s