Sdílet prostřednictvím


How to: Set the Mail Profile for SQL Server Agent (SQL Server Management Studio)

Microsoft SQL Server can send and receive e-mail by establishing a client connection with a messaging server. SQL Server sends and receives e-mail by using either a Database Mail or SQL Mail session. This topic describes how to set the mail profile for SQL Server Agent so operators can be notified when alerts are triggered by job steps.

Before you can set the mail profile for SQL Server Agent, you must enable and configure either SQL Mail or Database Mail. For more information on SQL Mail, see How to: Set Up SQL Mail (SQL Server Management Studio). For more information on Database Mail, see Database Mail Configuration Wizard.

To set the mail profile for SQL Server Agent

  1. In the Object Explorer, connect to an instance of the SQL Server Database Engine and then expand that instance.

  2. Right-click SQL Server Agent, and then click Properties.

  3. On the Alert System page, check Enable Mail Profile.

    If the Enable Mail Profile checkbox is not available, SQL Mail or Database Mail is not configured properly. For more information, see Database Mail How-to Topics and SQL Mail How-to Topics.

  4. Select either Database Mail or SQL Mail from the Mail system list. If you choose SQL Mail, select a profile in the Mail profile box. If no profiles are listed, enter the name of the profile to use.

  5. Restart the SQL Server Agent service for your changes to take effect. For more information, see How to: Restart the SQL Server Agent Service (SQL Server Management Studio).

See Also

Concepts