EXEC msdb.dbo.sp_send_dbmail 
		@recipients= 'test@test.com',
		@profile_name ='Test Profile Name',
		@subject = 'Test email',
		@body='Test email',
		@body_format = 'HTML'

		

EXEC msdb.dbo.sysmail_help_status_sp; -- STARTED
EXEC msdb.dbo.sysmail_help_queue_sp @queue_type = 'mail';  -- RECEIVES_OCCURRING

SELECT * FROM msdb.dbo.sysmail_event_log;

Note: If no errors seen on the database side, it could be some problem with the outgoing STMP email server.

Sources:

https://learn.microsoft.com/en-us/sql/relational-databases/database-mail/database-mail-general-troubleshooting?view=sql-server-ver16

Last modified: January 24, 2023

Author

Comments

Write a Reply or Comment