SQL Server 2016 SP2, Database mail not sending mails. RRS feed

  • Question

  • I have several sql server instances running SQL Server 2016, sp2

    Microsoft SQL Server 2016 (SP2-GDR) (KB4532097) - 13.0.5102.14 (X64)   Dec 31 2019 22:39:35   Copyright (c) Microsoft Corporation  Enterprise Edition: Core-based Licensing (64-bit) on Windows Server 2016 Standard 10.0 <X64> (Build 14393: ) (Hypervisor)

    I have configured SQL Server Database mail but my mail is not sending to recipient.

    As per some blogs there were mail issues with SP1 where it should have .NET 3.5 framework should installed but mine is SP2 and it has all the same sign like SP1 mail issue.

    When I launch DatabaseMail.exe in binn folder I see this error 

    The following feature couldn't be installed

    .NET Framework 3.5 (Include .NET 2.0 and 3.0)

    As per this workaround suggested in this Microsoft support page


    I opted for Workaround 1 and placed the DatabaseMail.exe.config to same binn folder where we have DatabaseMil.exe and now when I launch DatabaseMail.exe Its is opening with black console window, I think that was expectation so I thought my mail issue is gone but then I still have the issue.

    Though the .NET 3.5 Framework issues was related to SP1 but I have the same symptom where as I have SQL Server 2016 SP2.

    Help me to get rid of this issue.. There are few constraint though .. 

    I can not ask for install .NET 3.5 framework as I didn't find any blog where it is saying the issue could be with SP2 also so I don't have proper justification which I can furnish for this issue.

    I can not ask for repair SQL Server also as there are outage involve which we can not afford for this issue.


    Monday, July 20, 2020 11:58 AM

All replies

  • Is .NET 3.5 installed or not? If not, why not installing it? Cause the error message itself should be justification enough.

    When using that mentioned workaround, what are the still existing symptoms of "not sending mails"?

    What do the error logs and sysmail tables say?

    Monday, July 20, 2020 12:08 PM
  • As per all other blogs the .NET 3.5 issue was with SP1 , though when I launched the DatabaseMail.exe in Binn folder I was getting the same error , and after placing the DatabaseMail.exe.config the error gone but mail is still unsent state.

    I opted Workaround 1 , where just created the config file and placed it in the same folder where we have DatabaseMail.exe and no I am not getting the .NET 3.5 error when I am launching the DatabaseMail.

    So thought the issue gone but then mail are not sending. 


    Monday, July 20, 2020 12:56 PM
  • So thought the issue gone but then mail are not sending. 

    How do you see that is not sending?

    Monday, July 20, 2020 2:12 PM
  • These are the queries .. I am using for checking details.

    SELECT * FROM msdb.dbo.sysmail_sentitems;

    SELECT * FROM msdb.dbo.sysmail_unsentitems

    select * from msdb.dbo.sysmail_allitems


    Monday, July 20, 2020 3:40 PM
  • Have you checked the sysmail_log table? I don't have database mail going on my instances at home, but I would expect this to be the table where you find errors.

    I think it is a foregone conclusion that it is a .NET problem. It could also be that the mail profile in Windows is not set up correctly or something like that.

    Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

    Monday, July 20, 2020 9:58 PM
  • Mail Profile is not an issue .. Even I have noticed in one server we have that mail was working properly during 2019 sometimes.. I am sure that problem started after SP2 security patch applied. it is not only one server we have lots of servers and not any of the server that DBmail is working.

    I didn't find any blog where I see that issue is still there with SP2 also.. all blogs are with SP1 where as I when I launched the DatabaseMail.exe it is showing that same .NET 3.5 error and I followed one support docs and created DatabaseMaile.exe.config and placed in Binn folder now that error is not showing up.

    I don't know what else I can do. 


    Tuesday, July 21, 2020 7:21 AM