Join Us!

Spaces are allowed; punctuation is not allowed except for periods, hyphens, and underscores.
A valid e-mail address. All e-mails from the system will be sent to this address. The e-mail address is not made public and will only be used if you wish to receive a new password or wish to receive certain news or notifications by e-mail.
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Enter the characters shown in the image.


Enter your Project Envision username.
Enter the password that accompanies your username.
Request new password

Configure Database Mail in Sql Server 2008

Database Mail in Sql Server 2008 enables sending outbound mail messages. Although the primary use of Database Mail is to send alert messages to administrators, it can also be used to send results of the query, or in Transact - SQL code. Database Mail uses the Simple Mail Transport Protocol (SMTP) to transmit mail messages. It is important to remember that messages are sent by Sql Server Agent, so if it is not running the messages will be accumulated in msdb database and sent when Agent will be started.

We start the Database Mail configuration from enabling Database Mail feature using sp_configure stored procedure.

sp_configure 'show advanced options',1
Configuration option 'show advanced options' changed from 0 to 1. Run the RECONFIGURE statement to install.

Command(s) completed successfully.

sp_configure 'Database Mail XPs',1
Configuration option 'Database Mail XPs' changed from 0 to 1. Run the RECONFIGURE statement to install.

Command(s) completed successfully.

Then in Object Explorer, under Management node click Configure Database Mail

The Database Mail Configuration Wizard will start, on initial screen click Next

Select Setup Database Mail by preforming the following tasks and click next

Enter Profile Name and Profile Description, than click Add to setup SMTP account.

Fill the Account Name, Email Address, Display name, Reply Email and Server Name. Then select appropriate SMTP authentication for your server.

Then click next

Check Public checkbox and set Profile to be default

Review or change the settings on Configure System Parameters screen

After clicking next Wizard will Show the list of steps that will be performed.

On the final screen you should see all four tasks completed successfully.

We can test the newly setup account by right clicking Database Mail in Sql Server Management Studio and selecting Send Test E-mail

On the next screen we provide recipient email address and click send.

Then on the next you should click Ok if you received the email or Troubleshoot if you you have not.

Instead of clicking Troubleshoot you can check the contents of msdb.dbo.sysmail_event_log

select * from msdb.dbo.sysmail_event_log