Export (0) Print
Expand All

Troubleshooting Database Mail: Sending Test E-Mail

Use the Send Test E-Mail dialog box to test the ability to send mail using a specific profile.

To send a test e-mail message

  1. Using Object Explorer, connect to an instance of SQL Server Database Engine where Database Mail is configured, expand Management, right-click Database Mail, and then click Send Test E-Mail. If no Database Mail profiles exist, a dialog prompts the user to create a profile and opens the Database Mail Configuration Wizard.

  2. In the Send Test E-Mail from <instance name> dialog box, in the Database Mail Profile box select the profile you want to test.

  3. In the To box, type the e-mail name of the recipient of the test e-mail.

  4. In the Subject box, type the subject line for the test e-mail. Change the default subject to better identify your e-mail for troubleshooting.

  5. In the Body box, type to body of the test e-mail. Change the default subject to better identify your e-mail for troubleshooting.

  6. Click Send Test E-Mail to send the test e-mail to the Database Mail queue.

  7. Sending the test e-mail opens the Database Mail Test E-Mail dialog box. Make a note of the number displayed in the Sent e-mail box. This is the mailitem_id of the test message. Click OK.

  8. On the Toolbar click New Query to open a Query Editor window. Execute the following statement to determine the status of the test e-mail message:

    SELECT * FROM msdb.dbo.sysmail_allitems 
       WHERE mailitem_id = <the mailitem_id from the previous step> ;
    

    The sent_status column indicates if the test e-mail message was sent.

  9. If errors occurred, execute the following statement to view the error message:

    SELECT * FROM msdb.dbo.sysmail_event_log 
       WHERE mailitem_id = <the mailitem_id from the previous step> ;
    

You must be a member of the sysadmin fixed server role to use the Send Test E-Mail dialog box. Users who are not members of the sysadmin fixed server role can test Database Mail using the sp_send_dbmail procedure.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft