You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This topic describes how to enable and configure [Database Mail](database-mail.md) using the Database Mail Configuration Wizard, and create a Database Mail Configuration script using templates.
45
+
This article describes how to enable and configure [Database Mail](database-mail.md) using the Database Mail Configuration Wizard, and create a Database Mail Configuration script using templates.
46
46
47
47
## <aname="BeforeYouBegin"></a> Before You Begin
48
-
Use the **DatabaseMail XPs** option to enable Database Mail on this server. For more information, see [Database Mail XPs Server Configuration Option](../../database-engine/configure-windows/database-mail-xps-server-configuration-option.md) reference topic.
48
+
Use the **DatabaseMail XPs** option to enable Database Mail on this server. For more information, see [Database Mail XPs Server Configuration Option](../../database-engine/configure-windows/database-mail-xps-server-configuration-option.md) reference article.
49
49
50
50
### <aname="Restrictions"></a> Limitations and Restrictions
51
51
Enabling [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] Service Broker in any database requires a database lock. If Service Broker was deactivated in `msdb`, to enable Database Mail, first stop [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] Agent so Service Broker can obtain the necessary lock.
52
52
53
53
### <aname="Security"></a> Security
54
-
To configure Database Mail you must be a member of the **sysadmin** fixed server role. To send Database Mail you must be a member of the **DatabaseMailUserRole** database role in the `msdb` database.
54
+
To configure Database Mail, you must be a member of the **sysadmin** fixed server role. To send an email with Database Mail, you must be a member of the **DatabaseMailUserRole** database role in the `msdb` database.
55
55
56
56
## <aname="DBWizard"></a> Use the Database Mail Configuration Wizard
57
57
@@ -160,7 +160,7 @@ ms.author: wiassaf
160
160
Specify the user name and password required by the SMTP server.
161
161
162
162
**User name**
163
-
Type the user name that Database Mail uses to log in to the SMTP server. The user name is required if the SMTP server requires basic authentication.
163
+
Type the user name that Database Mail uses to sign in to the SMTP server. The user name is required if the SMTP server requires basic authentication.
164
164
165
165
**Password**
166
166
Type the password that Database Mail uses to log in to the SMTP server. The password is required if the SMTP server requires basic authentication.
@@ -238,7 +238,7 @@ ms.author: wiassaf
238
238
Type a description for the profile. The description is optional.
239
239
240
240
**SMTP accounts**
241
-
Choose one or more accounts for the profile. The priority sets the order in which Database Mail uses the accounts. If no accounts are listed, you must click**Add** to continue, and add a new SMTP account.
241
+
Choose one or more accounts for the profile. The priority sets the order in which Database Mail uses the accounts. If no accounts are listed, you must select**Add** to continue, and add a new SMTP account.
Use this page to manage an existing Database Mail profile. A Database Mail profile is a collection of Database Mail accounts. Profiles improve reliability in cases where an e-mail server becomes unreachable, by providing alternative Database Mail accounts. At least one Database Mail account is required. For more information about setting the priority of Database Mail accounts in the profile, see [Create a Database Mail Profile](../../relational-databases/database-mail/create-a-database-mail-profile.md).
259
259
260
-
Use the **Move Up** and **Move Down** buttons to change the order in which Database Mail accounts are used. This order is determined by a value called the sequence number. **Move Up** lowers the sequence number and **Move Down** increases the sequence number. The sequence number determines the order in which Database Mail uses accounts in the profile. For a new e-mail message, Database Mail starts with the account that has the lowest sequence number. Should that account fail, Database Mail uses the account with the next highest sequence number, and so on until either Database Mail sends the message successfully, or the account with the highest sequence number fails. If the account with the highest sequence number fails, the Database Mail pauses attempts to send the mail for the amount of time configured in the Database Mail **AccountRetryDelay** parameter, then starts the process of attempting to send the mail again, starting with the lowest sequence number. Use the Database Mail **AccountRetryAttempts** parameter, to configure the number of times that the external mail process attempts to send the e-mail message using each account in the specified profile. You can configure the **AccountRetryDelay** and **AccountRetryAttempts** parameters on the **Configure System Parameters** page of the Database Mail Configuration Wizard.
260
+
Use the **Move Up** and **Move Down** buttons to change the order in which Database Mail accounts are used. This order is determined by a value called the sequence number. **Move Up** lowers the sequence number and **Move Down** increases the sequence number. The sequence number determines the order in which Database Mail uses accounts in the profile. For a new e-mail message, Database Mail starts with the account that has the lowest sequence number. Should that account fail, Database Mail uses the account with the next highest sequence number, and so on, until either Database Mail sends the message successfully, or the account with the highest sequence number fails. If the account with the highest sequence number fails, the Database Mail pauses attempts to send the mail for the amount of time configured in the Database Mail **AccountRetryDelay** parameter, then starts the process of attempting to send the mail again, starting with the lowest sequence number. Use the Database Mail **AccountRetryAttempts** parameter, to configure the number of times that the external mail process attempts to send the e-mail message using each account in the specified profile. You can configure the **AccountRetryDelay** and **AccountRetryAttempts** parameters on the **Configure System Parameters** page of the Database Mail Configuration Wizard.
261
261
262
262
**Profile name**
263
263
Select the name of the profile to manage.
@@ -295,7 +295,7 @@ ms.author: wiassaf
295
295
296
296
297
297
### <aname="AddAccount"></a> Add Account to Profile Page
298
-
Use this page to choose the account to add to the profile. Either choose an existing account from the **Account name** box, or click**New Account**.
298
+
Use this page to choose the account to add to the profile. Either choose an existing account from the **Account name** box, or select**New Account**.
299
299
300
300
**Account name**
301
301
Select the name of the account to add to the profile.
@@ -390,7 +390,7 @@ ms.author: wiassaf
390
390
The maximum size of an attachment, in bytes.
391
391
392
392
**Prohibited Attachment File Extensions**
393
-
A comma-separated list of extensions which cannot be sent as an attachment to an e-mail message. Click the browse button (**...**) to add additional extensions.
393
+
A comma-separated list of extensions that cannot be sent as an attachment to an e-mail message. Select the browse button (**...**) to add additional extensions.
394
394
395
395
**Database Mail Executable Minimum Lifetime (seconds)**
396
396
The minimum amount of time, in seconds, that the external mail process remains active. The process remains active as long as there are e-mails in the Database Mail queue. This parameter specifies the time the process remains active if there are no messages to process.
@@ -437,8 +437,7 @@ ms.author: wiassaf
437
437
The **mailitem_id** of the test e-mail message.
438
438
439
439
**Troubleshoot**
440
-
Click to open Books Online to the [Troubleshooting Database Mail](/previous-versions/sql/sql-server-2008-r2/ms188663(v=sql.105))topic.
441
-
440
+
Opens this Docs article.
442
441
443
442
444
443
## <aname="Template"></a> Use SQL Server Management Studio templates to generate T-SQL
This topic describes how to configure [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] Agent to use [Database Mail](database-mail.md) to send notification and alerts in [!INCLUDE[ssnoversion](../../includes/ssnoversion-md.md)] by using [!INCLUDE[ssManStudioFull](../../includes/ssmanstudiofull-md.md)].
19
+
This article describes how to configure [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] Agent to use [Database Mail](database-mail.md) to send notification and alerts in [!INCLUDE[ssnoversion](../../includes/ssnoversion-md.md)] by using [!INCLUDE[ssManStudioFull](../../includes/ssmanstudiofull-md.md)].
20
20
21
21
- For information on how to enable and configure Database Mail, see [Configure Database Mail](../../relational-databases/database-mail/configure-database-mail.md).
22
22
- For an example using [!INCLUDE[tsql](../../includes/tsql-md.md)], see [Create a Database Mail Profile](../../relational-databases/database-mail/create-a-database-mail-profile.md).
@@ -45,7 +45,7 @@ The following steps are not necessary in [!INCLUDE[ssazuremi_md](../../includes/
45
45
46
46
- In Object Explorer, expand a [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] instance.
47
47
48
-
- Right-click **SQL Server Agent**, and then click**Properties**.
48
+
- Right-click **SQL Server Agent**, and then select**Properties**.
49
49
50
50
- Select **Alert System**.
51
51
@@ -71,4 +71,4 @@ The following steps are not necessary in [!INCLUDE[ssazuremi_md](../../includes/
Copy file name to clipboardExpand all lines: docs/relational-databases/database-mail/database-mail.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,7 @@ ms.author: wiassaf
17
17
---
18
18
# Database Mail
19
19
[!INCLUDE [SQL Server SQL MI](../../includes/applies-to-version/sql-asdbmi.md)]
20
-
Database Mail is an enterprise solution for sending e-mail messages from the [!INCLUDE[ssDEnoversion](../../includes/ssdenoversion-md.md)] or [Azure SQL Managed Instance](/azure/sql-database/sql-database-managed-instance-index). Using Database Mail, your database applications can send e-mail messages to users. The messages can contain query results, and can also include files from any resource on your network.
20
+
Database Mail is an enterprise solution for sending e-mail messages from the [!INCLUDE[ssDEnoversion](../../includes/ssdenoversion-md.md)] or [Azure SQL Managed Instance](/azure/sql-database/sql-database-managed-instance-index). Your applications can send e-mail messages to users using Database Mail via an external SMTP server. The messages can contain query results, and can also include files from any resource on your network.
21
21
22
22
> [!NOTE]
23
23
> Database Mail is available in [!INCLUDE[ssDEnoversion](../../includes/ssdenoversion-md.md)] and [Azure SQL Managed Instance](/azure/sql-database/sql-database-managed-instance-index), but not in Azure SQL database singleton and elastic pools. For more information on using Database Mail in [!INCLUDE[ssazuremi_md](../../includes/ssazuremi_md.md)], see [Automate management tasks using SQL Agent jobs in Azure SQL Managed Instance](/azure/azure-sql/managed-instance/job-automation-managed-instance).
A Database Mail profile holds any number of Database Mail accounts. Database Mail stored procedures can refer to a profile by either the profile name or the profile id generated by this procedure. For more information about adding an account to a profile, see [sysmail_add_profileaccount_sp (Transact-SQL)](../../relational-databases/system-stored-procedures/sysmail-add-profileaccount-sp-transact-sql.md).
54
+
A Database Mail profile holds any number of Database Mail accounts. Database Mail stored procedures can refer to a profile by either the profile name or the profile ID generated by this procedure. For more information about adding an account to a profile, see [sysmail_add_profileaccount_sp (Transact-SQL)](../../relational-databases/system-stored-procedures/sysmail-add-profileaccount-sp-transact-sql.md).
55
55
56
-
The profile name and description can be changed with the stored procedure `sysmail_update_profile_sp`, while the profile id remains constant for the life of the profile.
56
+
The profile name and description can be changed with the stored procedure `sysmail_update_profile_sp`, while the profile ID remains constant for the life of the profile.
57
57
58
58
The profile name must be unique in the [!INCLUDE[ssDEnoversion](../../includes/ssdenoversion-md.md)] instance or the stored procedure returns an error.
@description ='Profile used for administrative mail.' ;
75
75
```
76
76
77
-
### B. Creating a new profile, saving the profile id in a variable
77
+
### B. Creating a new profile, saving the profile ID in a variable
78
78
79
-
The following example creates a new Database Mail profile named `AdventureWorks Administrator`. The example stores the profile id number in the variable `@profileId` and returns a result set containing the profile id number for the new profile.
79
+
The following example creates a new Database Mail profile named `AdventureWorks Administrator`. The example stores the profile ID number in the variable `@profileId` and returns a result set containing the profile ID number for the new profile.
0 commit comments