web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :

How to Enable the Microsoft SQL Server Database Mail Feature

Ian Grieve Profile Picture Ian Grieve 22,784
Microsoft SQL ServerI’ve done work for a few clients recently where I’ve created stored procedures or triggers in SQL Server which needed to send email. One of them was for a Microsoft Dynamics GP client where they wanted to send an email when a PR was converted to PO; sending emails in tis way uses a part of SQL Server called Database Mail.

Database Mail is installed but not configured by default, so using it requires that it be configured. I’ve not done this personally myself until recently when I needed to configure my demo VM to send this type of custom workflow notifications.

To enable Database Mail launch SSMS and connect to the SQL Server. Expand the Management node and right click on Database Mail and select Configure Database Mail:

SSMS Database Mail popup menu

On the Welcome page, click Next:

Database Mail Configuration Wizard: Welcome

The configuration task we want is to Setup Database Mail by performing the following tasks…” so make sure this radio button is marked and click Next:

Database Mail Configuration Wizard: Select Configuration Task

You’ll be prompted that the Database Mail feature is not enabled and to confirm you want to enable it; click Yes:

Confirmation message box

You need to create a profile for use with Database Mail. Enter a Profile Name and Description and click the Add button to add a Database Mail Account:

Database Mail Configuration Wizard: New Profile

The database mail account has a number of details which need to be provided:

  • Account name
  • Description
  • E-mail address
  • Display name
  • Reply e-mail
  • Server name
  • Port
  • If the SMTP server requires a secure connection
  • Authentication method
  • If Basic Authentication is needed:
    • User name
    • Password
    • Confirm Password

Once you’ve entered the details, click OK:

New Database Mail Account

With the database mail account has been created, click Next:

Database Mail Configuration Wizard: New Profile

Set the profile to Public and click Next:

Database Mail Configuration Wizard: Manage Profile Security

Check the system parameters and click Next:

Database Mail Configuration Wizard: Configure System Parameters

Check the actions you’ve selected and click Finish:

Database Mail Configuration Wizard: Complete the Wizard

The selected actions will be performed and a status displayed:

Database Mail Configuration Wizard: Configuring...

With Database Mail enabled and configured, you’ll be able to use the feature to send emails from SQL Server.

Read original post How to Enable the Microsoft SQL Server Database Mail Feature at azurecurve|Ramblings of an IT Professional


This was originally posted here.

Comments

*This post is locked for comments