Search This Blog

Monday, January 20, 2014

Check the Status of E-Mail Messages SQL Server

SQL Server > Catalog Views > Database mail sysmail_faileditems

In this SQL example will find information about any emails could not send successfully.


SELECT fi.subject, fi.last_mod_date,lg.description

FROM
   dbo.sysmail_faileditems as fi
INNER JOIN dbo.sysmail_event_log AS lg
ON fi.mailitem_id = lg.mailitem_id