May 17, 2026, 11:40 PM
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
Use the below query to get details for all emails sent the same date:
|
||||
SELECT * FROM msdb..sysmail_mailitems WHERE sent_date > DATEADD(DAY, -1,GETDATE())
|
||||
And here is the complete query to get all the failed emails from the past 24 hours:
|
||||
SELECT items.subject ,
|
||||
items.recipients ,
|
||||
items.copy_recipients ,
|
||||
items.blind_copy_recipients ,
|
||||
items.last_mod_date ,
|
||||
l.description
|
||||
FROM msdb.dbo.sysmail_faileditems AS items
|
||||
LEFT OUTER JOIN msdb.dbo.sysmail_event_log AS l
|
||||
ON items.mailitem_id = l.mailitem_id
|
||||
WHERE items.last_mod_date > DATEADD(DAY, -1,GETDATE())
|
||||
Reference in New Issue
Block a user