Problems with Database Mail in some versions of SQL 2016
Microsoft, as you may already know, has removed the requirement for dotnet 3.5 in SQL Server 2016. This is always appreciated during installation and from a security perspective (less attack surfaces).
One problem with this, however, is that if you install SQL 2016 SP1 (including CU1), your DatabaseMail will not work, it will be completely dead, and you won't see anything in your logs. Microsoft's solution to the problem is to install dotnet 3.5(https://support.microsoft.com/en-us/help/3186435/fix-sql-server-2016-database-mail-does-not-work-on-a-computer-that-does-not-have-the-.net-framework-3.5-installed) which feels a bit boring.
A workaround that we know works is to simply create a .config file for DatabaseMail.exe that looks like this:
<?xml version="1.0"?> <configuration> <startup useLegacyV2RuntimeActivationPolicy="true"> <supportedRuntime version="v4.0"/> <supportedRuntime version="v2.0.50727"/> </startup> </configuration>
It should be called DatabaseMail.exe.config and be located in C:Program FilesMicrosoft SQL ServerMSSQL13.MSSQLSERVERMSSQLBinn (or wherever you have installed SQL Server). After this file is in place, DatabaseMail will work again. No restarts are needed.
If you are not running SQL 2016 SP1 CU1, but instead SQL 2016 (rtm) CU2, then the problem should be fixed by Microsoft.
We expect this to be resolved in CU2 for SQL 2016.
/ Pontus