When sending email via sp_send_dbmail, SQL Server will log the status of each message processed by Database Mail. Below is quick list of Database Mail Views you can query to find the status of each sp_send_dbmail call.
- To see messages with the failed status, use sysmail_faileditems.
- To see all messages processed by Database Mail, use sysmail_allitems.
- To see unsent messages, use sysmail_unsentitems.
- To see messages that were sent, use sysmail_sentitems.
- To view e-mail attachments, use sysmail_mailattachments.
- To view Windows or SQL Server messages returned by the Database Mail system, use sysmail_event_log.