Previous Backup Service Master Key Manual Configuration Configure SQL Mail Next

Configure Database Mail

FineBuild can Configure Database Mail for use by SQL Server Agent.

The Database Mail functionality is used by the SQL Server Agent instance. It uses SMTP to send and receive mail, and avoids the reliability shortcomings experienced when using MAPI-based mail.

SQL Server must be running using a Domain service account for Database Mail to be configured.

FineBuild Configure Database Mail

The Database Mail configuration relates to Process Id 5BB and is controlled by the parameters below:

Parameter Build SQL 2005 SQL 2008 SQL 2008 R2 SQL 2012
ConfigDBMail FULL Yes Yes Yes Yes
ConfigDBMail WORKSTATION Yes Yes Yes Yes

FineBuild also uses the following parameters to help configure Database Mail:
Prameter Description
Mailserver Name of the Mail Server to be used. This will default to the nearest Exchange Server in the Domain if one can be found.
DBMailProfile Database Mail profile name. Defaults to Public DB Mail


Manual Configure Database Mail

The following steps show what you would have to do for manual Database Mail configuration. FineBuild does all of this work for you automatically.

SQL Server must be running using a Domain service account for Database Mil to be configured.

1) Use SQL Server Management Studio to run the following command to enable the use of Database Mail:
SP_Configure 'Database Mail XPs', '1' 

2) Navigate to Management -> Database Mail, right-click and select Configure Database Mail
SSMS Config DB Mail.png
3) On the Select Configuration Task page, click Next
Config Task.png
4) If a message similar to the following appears, click Yes
Cannot resolve image macro, invalid image name or id.
5) Set the following New Profile value then click on Add
Profile name Public DB Mail

New Profile.png
6) Set the following New Database Mail Account values, then click OK
Account Name SQL Alerts
E-mail address service account email address
Display name SQL Server instance name
Server name SMTP or Exchange server name
Windows authentication Selected

a) The service account email address will always take the form of serviceaccount@dnsdomain (E.G. servgbsqldb0001@ROOT.local)
b) The Exchange server name can be obtained from your Support Centre
c) If an SMTP server is used, either Basic or Anonymous authentication must be used
d) Site standards may require This server requires a secure connection (SSL) to be checked
Mail Account.png
7) On the New Profile page, click Next
New Profile Next.png
8) On the Manage Profile Security page, clear the Show only existing public profiles field.
Set the following Manage Profile Security values, and then click Next
Public Checked
Default Profile Yes

Manage Profile.png
9) On the Configure System Parameters page, click Next
System Parameters.png
10) On the Complete the Wizard page, click Finish
11) On the Configuring page, all operations should show Success. Click Close to finish.
Copyright © 2012 Edward Vassie. License and Acknowledgements
Previous Backup Service Master Key Top Configure SQL Mail Next

Last edited Nov 22, 2012 at 2:53 PM by EdVassie, version 2