SQL 2016 database mail not working even though I have tired many things

sqlagent007
sqlagent007 used Ask the Experts™
on
For some reason I am NOT able to get SQL Mail working on a particular server running SQL 2016. I can send a message from powershell no problem.

I have done the following:
  • Enabled database mail
  • Checked the box for enable mail in the SQL agent
  • Restarted both SQL Agent and SQL Server
  • Attempted to send a test message.
  • Started the SQL Browser
  • Added the SQL Engine and agent account to the local admins group

When I run this query, I show all test messages in the UNSENT queue and 0 messages in the sent queue

SELECT * FROM msdb.dbo.sysmail_sentitems;
SELECT * FROM msdb.dbo.sysmail_unsentitems;
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Commented:
I had the same problem, and learned that v2016 mail needs netframework 3.5 to work.  You should load .net 3.5 and restart the service.  Afterward the mail will work fine.
sqlagent007Technology professional

Author

Commented:
On the other server where it is working, that feature is not installed.....? They are part of an AAG...? Crazy right!?!?! I will try installing it.

Commented:
I had exactly the problem you've described -- all the way to the 'unsent' messages.  After .net and the restart, everything worked fine.  I also received all of the unsent messages that were previously unsent.
Ensure you’re charging the right price for your IT

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden using our free interactive tool and use it to determine the right price for your IT services. Start calculating Now!

sqlagent007Technology professional

Author

Commented:
You were correct. Once .net 3.5 was installed, all the mail came through.
sqlagent007Technology professional

Author

Commented:
Thanks!

Commented:
Excellent.  Glad to have helped.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial