SQL 2016 Won’t Send Mail

Download PDF

One of the more challenging components to configure on SQL Server is SQL Mail. I don’t know how many times I have had to try it multiple times before getting it right.

Here is an article written by Derrick, one of the Stedman Solutions team on problems with SQL Server 2016 being able to send email.

Written by Derrick Bovenkamp:

(original post here: https://bovenkamp.us/blog/2019/4/29/sql-2016-wont-sent-mail )

I’ve come across this problem a few times and always end up googling it so I figured I would make a post for my own benefit and also to help anyone else running into the issue.

Basically the RTM version of SQL Server 2016 has a bug in it where it doesn’t reference the correct .NET version.

You can fix the issue by doing one of these work arounds.

1) Create a DatabaseMail.exe.config file and place it with DatabaseMail.exeunder the Binn folder. The easiest way is to use Notepad and then to choose UTF-8 encoding when Saving the file.

         <?xml version="1.0" encoding="utf-8" ?>

         <configuration>

         <startup useLegacyV2RuntimeActivationPolicy="true"> 

         <supportedRuntime version="v4.0"/>     

         <supportedRuntime version="v2.0.50727"/>

         </startup>

         </configuration>

2) Run setup repair of SQL Server 2016. I don’t recommend this option.

3) Install .Net Framework 3.5.

4) Update SQL 2016 to SP1 and the Latest CU.

See this Microsoft KB for more details. https://support.microsoft.com/en-ph/help/3186435/sql-server-2016-database-mail-doesn-t-work-when-net-framework-3-5

 

More from Stedman Solutions:

SteveStedman5
Steve and the team at Stedman Solutions are here for all your SQL Server needs.
Contact us today for your free 30 minute consultation..
We are ready to help!

Leave a Reply

Your email address will not be published. Required fields are marked *

*