

The message should eventually succeed or fail and post a message to the event log. Usually this is caused by a network interruption, a failure of the SMTP server, or an incorrectly configured Database Mail account. Message status retryingĪ status of retrying indicates that Database Mail has tried to deliver the message to the SMTP server but could not. To delete old unsent messages, wait until the undeliverable messages are the oldest messages in the queue, and then use sysmail_delete_mailitems_sp to delete them.

If the last attempt did not start the external program, verify that the Database Mail External Program is located in the correct directory, and that the service account for SQL Server has permission to run the executable. If the last successful delivery occurred some time ago, check the sysmail_event_log view to verify that the external program was successfully started by Service Broker. If the problem persists, consider using more than one profile to distribute messages among more than one SMTP server.Ĭheck the most recent modification date for successfully delivered messages. The Database Mail external program may have fallen behind in processing messages the rate at which the external program processes messages depends on network conditions, the retry time-out, the volume of messages, and the capacity of the SMTP server. Message status unsentĪ status of unsent indicates that the Database Mail external program has not yet processed the e-mail message. If there are entries in the sysmail_event_log view, check the sysmail_allitems view for the status of the messages. If there are errors in the sysmail_event_log view, troubleshoot the specific error. If there is no entry in the sysmail_event_log view, see the symptom Messages Queued, No Entries in sysmail_event_log. The view should contain an entry stating that the Database Mail external program has been started. Then, execute the following statement in the msdb database to check the status of the mail queue: sysmail_help_queue_sp = 'Mail' įor a detailed explanation of the columns, see sysmail_help_queue_sp (Transact-SQL).Ĭheck the sysmail_event_log view for activity. The Database Mail external program logs e-mail activity in the msdb database.įirst, to confirm that Database Mail is enabled, use the Database Mail XPs Option of the sp_configure system stored procedure, as in the following example: EXEC sp_configure 'show advanced', 1 This topic describes how to troubleshoot a problem where e-mail messages are successfully queued, but the messages are not delivered.
