Skip to content

Instantly share code, notes, and snippets.

@okuniw
Last active December 30, 2015 18:09
Show Gist options
  • Save okuniw/7866139 to your computer and use it in GitHub Desktop.
Save okuniw/7866139 to your computer and use it in GitHub Desktop.
Query SQL Database Mail Log
select a.send_request_date
,a.sent_date
,a.sent_status
,a.subject
,a.recipients
,a.copy_recipients
,a.blind_copy_recipients
,l.event_type
,l.log_date
,l.description
,*
from sysmail_allitems a /* history */
join sysmail_event_log l /* log */
on a.mailitem_id = l.mailitem_id
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment