Email is configured and working on a SQL Server 2016 server and then suddenly stops working
We have seen this twice in the last couple of weeks and it has been due to Windows Updates applying Cumulative Updates for SQL Server and these updates have broken email. (CU1)
Use a text editor to create a file called DatabaseMail.exe.config (ensure that there is no .TXT extension)
In the file add the following…
<?xml version="1.0" encoding="utf-8" ?> <configuration> <startup useLegacyV2RuntimeActivationPolicy="true"> <supportedRuntime version="v4.0"/> <supportedRuntime version="v2.0.50727"/> </startup> </configuration>
Then save the file to the BINN directory (to make sure you are in the correct folder, it should contain the file DatabaseMail.exe)
SQL Server Email should now work. No need to reboot or stop or start SQL Server.
For further information….
Important notes to above.
Make sure that the quotes around the version numbers are surrounded by proper double quotes ”
When the file is saved in notepad make sure that it is saved in UTF format. This is not normally default.
In the text file, make sure that there is no space before the opening <?xml line. For other lines this doesn’t matter.