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_unsentite