Applies ToSQL Server 2016 Developer - duplicate (do not use) SQL Server 2016 Enterprise - duplicate (do not use) SQL Server 2016 Enterprise Core - duplicate (do not use) SQL Server 2016 Standard - duplicate (do not use) SQL Server 2016 Service Pack 1

Symptoms

Assume that you install Microsoft SQL Server 2016 on a computer that has the .NET Framework 4.6.1 installed. If the computer does not have the .NET Framework 3.5 installed, the Database Mail feature does not work correctly. For example, if you configure and send a test email message, the message is queued but is never sent.Note This issue also affects instances that are running SQL Server 2016 SP1 CU1. This issue occurs because of a bug in SQL Server 2016 SP1 CU setup. The setup for SQL Server 2016 CUs deletes the config file DatabaseMail.exe.config without replacing it with a new one. This causes the Database Mail to break in the absence of .Net framework 3.5 SP1. However, if the Database Mail is broken by the installation of a SQL Server 2016 CU, you can use any one of the workarounds mentioned below.

Resolution

This problem was fixed in the following cumulative updates for SQL Server:    Cumulative Update 2 for SQL Server 2016 SP1

Cumulative Update 2 for SQL Server 2016

Each new cumulative update for SQL Server contains all the hotfixes and all the security fixes that were included with the previous cumulative update. Check out the latest cumulative updates for SQL Server:

Latest cumulative update for SQL Server 2016

Workaround

To work around this issue, you can implement any one of the following:

  1. Create the DatabaseMail.exe.config and drop it next to the DatabaseMail.exe under the Binn folder. You can use notepad.exe or any other editor to edit it. Just make sure you save it by using UTF-8 encoding (in notepad.exe, select Save As... and in the Encoding combo box, select UTF-8):

         <?xml version="1.0" encoding="utf-8" ?>          <configuration>          <startup useLegacyV2RuntimeActivationPolicy="true">           <supportedRuntime version="v4.0"/>               <supportedRuntime version="v2.0.50727"/>          </startup>          </configuration>
  1. Run a repair setup action of SQL Server 2016.

  2. Manually install .Net Framework 3.5 on the machine.

Status

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

References

Learn about the terminology Microsoft uses to describe software updates.

Need more help?

Want more options?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.