SQLTeam.com | Weblogs | Forums

Tracking failed emails sent from DB mail

I'm attempting to report on emails that have failed to send. But in one or more cases, the mail sent with a bad domain name such as -com was not written to [msdb].[dbo].[sysmail_mailitems] at all, no row.

On what conditions are entries flagged as failed in [msdb].[dbo].[sysmail_mailitems]?

If a recipients email address is incorrect, does a row get inserted into [msdb].[dbo].[sysmail_mailitems] ?

What would it's send_Status value be?

Have you looked at sysmail_faileditems? That's more specific to email failures and may include data not in sysmail_mailitems.

@robert_volk Table msdb.dbo.sysmail_faileditems does contain different entries but it does not contain any
rows where the email recipient domain is faulty/invalid. Thanks anyway.