mysql配置数据库邮件_配置数据库邮件 - SQL Server | Microsoft Docs

配置数据库邮件Configure Database Mail

03/14/2017

本文内容

适用于:Applies to: 719f28649793c602f9270966b5ed5c39.pngSQL ServerSQL Server(所有支持的版本)719f28649793c602f9270966b5ed5c39.pngSQL ServerSQL Server (all supported versions)适用于:Applies to: 719f28649793c602f9270966b5ed5c39.pngSQL ServerSQL Server(所有支持的版本)719f28649793c602f9270966b5ed5c39.pngSQL ServerSQL Server (all supported versions)

本主题说明如何使用数据库邮件配置向导启用和配置数据库邮件,以及使用模板创建数据库邮件配置脚本。This topic describes how to enable and configure Database Mail using the Database Mail Configuration Wizard, and create a Database Mail Configuration script using templates.

开始之前Before You Begin

使用 DatabaseMail XPs 选项可以在此服务器上启用数据库邮件。Use the DatabaseMail XPs option to enable Database Mail on this server.

限制和局限Limitations and Restrictions

在任何数据库中启用 SQL ServerSQL Server Service Broker 都需要数据库锁。Enabling SQL ServerSQL Server Service Broker in any database requires a database lock. 如果在 msdb 中停用了 Service Broker,则若要启用数据库邮件,应首先停止 SQL ServerSQL Server 代理,以使 Service Broker 可以获取所需的锁。If Service Broker was deactivated in msdb, to enable Database Mail, first stop SQL ServerSQL Server Agent so Service Broker can obtain the necessary lock.

SecuritySecurity

要配置数据库邮件,您必须是 sysadmin 固定服务器角色的成员。To configure Database Mail you must be a member of the sysadmin fixed server role. 若要发送数据库邮件,您必须是 msdb 数据库中的 DatabaseMailUserRole 数据库角色的成员。To send Database Mail you must be a member of the DatabaseMailUserRole database role in the msdb database.

使用数据库邮件配置向导Using Database Mail Configuration Wizard

使用向导配置数据库邮件To configure Database Mail using a wizard

“欢迎”页Welcome Page

此页说明配置数据库邮件的步骤。This page describes the steps to configuring Database Mail.

不再显示此页 - 选中它,可在以后的显示中跳过此“欢迎”页。Do not show this page again - Check this to skip this welcome page from displaying in the future.

下一步 - 继续到“选择配置任务”页。Next - Proceeds to the Select a configuration task page.

取消 - 终止向导而无需配置数据库邮件Cancel - Terminates the wizard without configuring Database Mail

选择配置任务Select Configuration Task

使用 “选择配置任务” 页可以指示每次使用此向导时要完成的任务。Use the Select Configuration Task page, to indicate which task you will complete each time you use the wizard. 如果您在完成向导前改变了主意,请使用 “上一步” 按钮返回此页并选择其他任务。If you change your mind before you complete the wizard, use the Back button to return to this page and select a different task.

备注

如果数据库邮件尚未启用,您将收到以下消息: “数据库邮件功能不可用。是否要启用此功能?If Database Mail has not been enabled, you will receive the message: The Database Mail feature is not available. Would you like to enable this feature? 回答“是”相当于使用 sp_configure 系统存储过程的 Mail XPs 选项启用数据库邮件。Responding Yes, is equivalent to enabling Database Mail by using the Database Mail XPs option of the sp_configure system stored procedure.

通过执行以下任务来设置数据库邮件Set up Database Mail by performing the following tasks

执行第一次设置数据库邮件所需的所有任务。Perform all of the tasks required to set up Database Mail for the first time. 此选项包含所有其他三个选项。This option includes all of the other three options.

管理数据库邮件帐户和配置文件Manage Database Mail accounts and profiles

创建新的数据库邮件帐户和配置文件,或者查看、更改或删除现有数据库邮件帐户和配置文件。Create new Database Mail accounts and profiles or to view, change, or delete existing Database Mail accounts and profiles.

管理配置文件安全性Manage profile security

配置对数据库邮件配置文件具有访问权限的用户。Configure which users have access to Database Mail profiles.

查看或更改系统参数View or change system parameters

配置数据库邮件系统参数,例如附件的最大文件大小。Configure Database Mail system parameters such as the maximum file size for attachments.

“新建帐户”页New Account Page

使用此页可以创建新的数据库邮件帐户。Use this page to create a new Database Mail account. 数据库邮件帐户包含向 SMTP 服务器发送电子邮件所需的信息。A Database Mail account contains information for sending e-mail to an SMTP server.

数据库邮件帐户包含 SQL ServerSQL Server 向 SMTP 服务器发送电子邮件所需的信息。A Database Mail account contains the information that SQL ServerSQL Server uses to send e-mail messages to an SMTP server. 每个帐户均包含一个电子邮件服务器的信息。Each account contains information for one e-mail server.

数据库邮件帐户仅用于数据库邮件。A Database Mail account is only used for Database Mail. 数据库邮件帐户与 SQL ServerSQL Server 帐户或 Microsoft Windows 帐户之间不相互对应。A Database Mail account does not correspond to a SQL ServerSQL Server account or a Microsoft Windows account. 可以利用 SQL Server 数据库引擎SQL Server Database Engine的凭据或您提供的其他凭据发送数据库邮件,也可以用匿名方式发送。Database Mail can be sent using the credentials of the SQL Server 数据库引擎SQL Server Database Engine, using other credentials that you supply, or anonymously. 使用基本身份验证时,数据库邮件帐户中的用户名和密码仅用于在电子邮件服务器中进行身份验证。When using basic authentication, the user name and password in a Database Mail account are only used for authentication with the e-mail server. 帐户无需与 SQL ServerSQL Server 用户或运行 SQL ServerSQL Server的计算机上的用户对应。An account need not correspond to a SQL ServerSQL Server user or a user on the computer running SQL ServerSQL Server.

帐户名称Account name

键入新帐户的名称。Type the name of the new account.

说明Description

键入帐户的说明。Type a description of the account. 说明是可选的。The description is optional.

电子邮件地址E-mail address

键入帐户电子邮件地址的名称。Type the name of the e-mail address for the account. 这是发送电子邮件的电子邮件地址。This is the e-mail address that e-mail is sent from. 例如, SQL ServerSQL Server 代理的帐户可能会通过地址 SqlAgent@Adventure-Works.com 发送电子邮件。For example, an account for SQL ServerSQL Server Agent may send e-mail from the address SqlAgent@Adventure-Works.com.

显示名称Display name

键入由此帐户发送的电子邮件上显示的名称。Type the name to show on e-mail messages sent from this account. 显示名称为可选项。The display name is optional. 这是由此帐户发送的邮件上显示的名称。This is the name displayed on messages sent from this account. 例如, SQL ServerSQL Server 代理的帐户可能会在电子邮件上显示名称“SQL Server 代理自动发件人”。For example, an account for SQL ServerSQL Server Agent may display the name "SQL Server Agent Automated Mailer" on e-mail messages.

答复电子邮件Reply e-mail

键入电子邮件地址,该地址是答复由此帐户发送的电子邮件所用到的地址。Type the e-mail address that will be used for replies to e-mail messages sent from this account. 答复电子邮件为可选项。The reply e-mail is optional. 例如,给 SQL ServerSQL Server 代理的帐户的回信可能会发送给数据库管理员 danw@Adventure-Works.com。For example, replies to an account for SQL ServerSQL Server Agent may go to the database administrator, danw@Adventure-Works.com.

服务器名称Server name

键入此帐户发送电子邮件所用的 SMTP 服务器的名称或 IP 地址。Type the name or IP address of the SMTP server the account uses to send e-mail. 通常此格式类似于 smtp. .com。Typically this is in a format similar to smtp..com. 如需相关帮助,请询问您的邮件管理员。For help with this, consult your mail administrator.

端口号Port number

键入此帐户的 SMTP 服务器的端口号。Type the port number of the SMTP server for this account. 大多数 SMTP 服务器使用端口 25。Most SMTP servers use port 25.

此服务器要求安全连接(SSL)This server requires a secure connection (SSL)

使用安全套接字层加密通信。Encrypts communication using Secure Sockets Layer.

使用数据库引擎服务凭据的 Windows 身份验证Windows Authentication using Database Engine service credentials

使用为 SQL Server 数据库引擎SQL Server Database Engine 服务配置的凭据生成指向 SMTP 服务器的连接。Connection is made to the SMTP server using the credentials configured for the SQL Server 数据库引擎SQL Server Database Engine service.

基本身份验证Basic Authentication

指定 SMTP 服务器要求的用户名和密码。Specify the user name and password required by the SMTP server.

用户名User name

键入数据库邮件登录 SMTP 服务器所用的用户名。Type the user name that Database Mail uses to log in to the SMTP server. 如果 SMTP 服务器要求基本身份验证,则需要提供用户名。The user name is required if the SMTP server requires basic authentication.

密码Password

键入数据库邮件登录 SMTP 服务器所用的密码。Type the password that Database Mail uses to log in to the SMTP server. 如果 SMTP 服务器要求基本身份验证,则需要提供密码。The password is required if the SMTP server requires basic authentication.

确认密码Confirm password

再次输入密码以进行确认。Type the password again to confirm the password. 如果 SMTP 服务器要求基本身份验证,则需要提供密码。The password is required if the SMTP server requires basic authentication.

匿名身份验证Anonymous authentication

在没有登录凭据的情况下,将邮件发送至 SMTP 服务器。Mail is sent to the SMTP server without login credentials. 在 SMTP 服务器不要求进行身份验证时可以使用此选项。Use this option when the SMTP server does not require authentication.

“管理现有帐户”页Manage Existing Account Page

使用此页可以管理现有数据库邮件帐户。Use this page to manage an existing Database Mail account.

帐户名称Account name

选择要查看、更新或删除的帐户。Select the account to view, update or delete.

删除Delete

删除选定的帐户。Delete the selected account. 必须从关联的配置文件中删除此帐户,或者删除此类配置文件,才能够删除所选帐户。You must remove this account from associated profiles, or delete such profiles, before you delete the selected account.

说明Description

查看或更新帐户的说明。View or update the description of the account. 说明是可选的。The description is optional.

电子邮件地址E-mail address

查看或更新帐户电子邮件地址的名称。View or update the name of the e-mail address for the account. 这是发送电子邮件的电子邮件地址。This is the e-mail address that e-mail is sent from. 例如,Microsoft SQL Server 代理的帐户可能会通过地址“SqlAgent@Adventure-Works.com”发送电子邮件。For example, an account for Microsoft SQL Server Agent may send e-mail from the address SqlAgent@Adventure-Works.com.

显示名称Display name

查看或更新由此帐户发送的电子邮件上显示的名称。View or update the name to show on e-mail messages sent from this account. 显示名称为可选项。The display name is optional. 这是由此帐户发送的邮件上显示的名称。This is the name displayed on messages sent from this account. 例如,SQL Server 代理的帐户可能会在电子邮件上显示名称 SQL Server Agent Automated Mailer 。For example, an account for SQL Server Agent may display the name SQL Server Agent Automated Mailer on e-mail messages.

答复电子邮件Reply e-mail

查看或更新电子邮件地址,该地址是答复由此帐户发送的电子邮件所用到的地址。View or update the e-mail address that will be used for replies to e-mail messages sent from this account. 答复电子邮件为可选项。The reply e-mail is optional. 例如,给 SQL Server 代理的帐户的回信可能会发送给数据库管理员“danw@Adventure-Works.com”。For example, replies to an account for SQL Server Agent may go to the database administrator, danw@Adventure-Works.com.

服务器名称Server name

查看或更新该帐户发送电子邮件所用的 SMTP 服务器的名称。View or update the name of the SMTP server the account uses to send e-mail. 通常此格式类似于 smtp..com。Typically this is in a format similar to smtp..com. 如需相关帮助,请询问您的邮件管理员。For help with this, consult your mail administrator.

端口号Port number

查看或更新此帐户的 SMTP 服务器的端口号。View or update the port number of the SMTP server for this account. 大多数 SMTP 服务器使用端口 25。Most SMTP servers use port 25.

此服务器要求安全连接(SSL)This server requires a secure connection (SSL)

使用安全套接字层加密通信。Encrypts communication using Secure Sockets Layer.

使用数据库引擎服务凭据的 Windows 身份验证Windows Authentication using Database Engine service credentials

使用为 SQL Server 数据库引擎SQL Server Database Engine 服务配置的凭据生成指向 SMTP 服务器的连接。Connection is made to the SMTP server using the credentials configured for the SQL Server 数据库引擎SQL Server Database Engine service.

基本身份验证Basic Authentication

指定 SMTP 服务器要求的用户名和密码。Specify the user name and password required by the SMTP server.

用户名User name

查看或更新数据库邮件登录 SMTP 服务器所用的用户名。View or update the user name that Database Mail uses to log in to the SMTP server. 如果 SMTP 服务器要求基本身份验证,则需要提供用户名。The user name is required if the SMTP server requires basic authentication.

密码Password

更改数据库邮件登录 SMTP 服务器所用的密码。Change the password that Database Mail uses to log in to the SMTP server. 如果 SMTP 服务器要求基本身份验证,则需要提供密码。The password is required if the SMTP server requires basic authentication.

确认密码Confirm password

再次输入密码以进行确认。Type the password again to confirm the password. 如果 SMTP 服务器要求基本身份验证,则需要提供密码。The password is required if the SMTP server requires basic authentication.

匿名身份验证Anonymous authentication

在没有登录凭据的情况下,将邮件发送至 SMTP 服务器。Mail is sent to the SMTP server without login credentials. 在 SMTP 服务器不要求进行身份验证时可以使用此选项。Use this option when the SMTP server does not require authentication.

“新建配置文件”页New Profile Page

使用此页可以创建数据库邮件配置文件。Use this page to create a 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. 有关在配置文件中设置数据库邮件帐户的优先级的详细信息,请参阅 Create a Database Mail Profile。For more information about setting the priority of Database Mail accounts in the profile, see Create a Database Mail Profile.

使用 “上移” 和 “下移” 按钮可以更改数据库邮件帐户的使用顺序。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. 如果具有最高序列号的帐户失败,则数据库邮件将在一段时间内(该时间在数据库邮件的 AccountRetryDelay 参数中配置)暂停发送邮件,之后从最低序列号开始重新尝试发送邮件。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. 使用数据库邮件的 AccountRetryAttempts 参数,可以配置外部邮件进程使用指定配置文件中的每个帐户尝试发送电子邮件的次数。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. 可以在数据库邮件配置向导的 “配置系统参数” 页上配置 AccountRetryDelay 和 AccountRetryAttempts 参数。You can configure the AccountRetryDelay and AccountRetryAttempts parameters on the Configure System Parameters page of the Database Mail Configuration Wizard.

配置文件名称Profile name

键入新配置文件的名称。Type the name for the new profile. 将使用此名称创建配置文件。The profile is created with this name. 不要使用现有配置文件的名称。Do not use the name of an existing profile.

说明Description

键入配置文件的说明。Type a description for the profile. 说明是可选的。The description is optional.

SMTP 帐户SMTP accounts

为配置文件选择一个或多个帐户。Choose one or more accounts for the profile. 优先级设置数据库邮件使用帐户的顺序。The priority sets the order in which Database Mail uses the accounts. 如果没有列出任何帐户,必须单击 “添加” 继续,并添加新的 SMTP 帐户。If no accounts are listed, you must click Add to continue, and add a new SMTP account.

添加Add

向配置文件中添加帐户。Add an account to the profile.

删除Remove

从配置文件中删除所选帐户。Remove the selected account from the profile.

上移Move Up

提高选定帐户的优先级。Increase the priority of the selected account.

“下移”Move Down

降低选定帐户的优先级。Decrease the priority of the selected account.

“管理现有配置文件”页Manage Existing Profile Page

使用此页可以管理现有的数据库邮件配置文件。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. 有关在配置文件中设置数据库邮件帐户的优先级的详细信息,请参阅 Create a Database Mail Profile。For more information about setting the priority of Database Mail accounts in the profile, see Create a Database Mail Profile.

使用 “上移” 和 “下移” 按钮可以更改数据库邮件帐户的使用顺序。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. 如果具有最高序列号的帐户失败,则数据库邮件将在一段时间内(该时间在数据库邮件的 AccountRetryDelay 参数中配置)暂停发送邮件,之后从最低序列号开始重新尝试发送邮件。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. 使用数据库邮件的 AccountRetryAttempts 参数,可以配置外部邮件进程使用指定配置文件中的每个帐户尝试发送电子邮件的次数。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. 可以在数据库邮件配置向导的 “配置系统参数” 页上配置 AccountRetryDelay 和 AccountRetryAttempts 参数。You can configure the AccountRetryDelay and AccountRetryAttempts parameters on the Configure System Parameters page of the Database Mail Configuration Wizard.

配置文件名称Profile name

选择要管理的配置文件的名称。Select the name of the profile to manage.

删除Delete

删除所选配置文件。Delete the selected profile. 系统将提示您选择 “是” 以删除所选配置文件并舍弃任何未发送的邮件,或者选择 “否” 以仅在没有未发送邮件时删除所选配置文件。You will be prompted to select Yes to delete the selected profile and to fail any unsent messages, or to select No to delete the selected profile only if there are no unsent messages.

说明Description

查看或更改所选配置文件的说明。View or change the description of the selected profile. 说明是可选的。The description is optional.

SMTP 帐户SMTP accounts

为配置文件选择一个或多个帐户。Choose one or more accounts for the profile. 故障转移优先级设置了在进行故障转移时数据库邮件使用帐户的顺序。The failover priority sets the order in which Database Mail uses the account in case of a failover.

添加Add

向配置文件中添加帐户。Add an account to the profile.

删除Remove

从配置文件中删除所选帐户。Remove the selected account from the profile.

上移Move Up

提高所选帐户的故障转移优先级。Increase the failover priority of the selected account.

“下移”Move Down

降低所选帐户的故障转移优先级。Decrease the failover priority of the selected account.

PriorityPriority

查看帐户的当前故障转移优先级。View the current failover priority of the account.

帐户名称Account name

查看帐户的名称。View the name of the account.

E-mail AddressE-mail Address

查看帐户的电子邮件地址。View the e-mail address of the account.

Add Account to Profile PageAdd Account to Profile Page

使用此页可选择要添加到配置文件的帐户。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.

帐户名称Account name

选择要添加到配置文件的帐户的名称。Select the name of the account to add to the profile.

电子邮件地址E-mail address

查看所选帐户的电子邮件地址。View the e-mail address for the selected account. 您不能在此页中更改电子邮件地址。You cannot change the e-mail address from this page. 若要更改该帐户的电子邮件地址,请返回到该向导的主页,再选择“管理数据库邮件帐户和配置文件”选项。To change the e-mail address for the account, go back to the main page of the wizard and select the Manage Database Mail accounts and profiles option.

服务器名称Server name

查看所选帐户的邮件服务器名称。View the mail server name for the selected account. 您不能在此页中更改服务器名称。You cannot change the server name from this page. 若要更改该帐户的服务器名称,请返回到该向导的主页,再选择 “管理数据库邮件帐户和配置文件” 选项。To change the server name for the account, go back to the main page of the wizard and select the Manage Database Mail accounts and profiles option.

“新建帐户”New Account

创建新帐户。Create a new account.

“管理帐户和配置文件”页Manage Accounts and Profiles Page

使用此页可选择用于管理配置文件或帐户的任务。Use this page to choose a task for managing a profile or account.

创建新帐户Create a new account

创建新帐户。Create a new account.

查看、更改或删除现有帐户View, change or delete an existing account

管理或删除现有帐户。Manage or delete an existing account.

创建新配置文件Create a new profile

创建新的配置文件。Create a new profile.

查看、更改或删除现有配置文件。还可以管理与该配置文件关联的帐户。View, change or delete an existing profile. You can also manage accounts associated with the profile.

更新或删除现有配置文件。Update or delete an existing profile. 使用此选项,您还可以管理与该配置文件关联的帐户。This option also allows you to manage accounts associated with the profile.

“管理配置文件安全性”,“公共”选项卡Manage Profile Security, Public Tab

使用此页可配置公共配置文件。Use this page to configure a public profile.

配置文件可以为公共配置文件或专用配置文件。Profiles are either public or private. 只有特定用户或角色才能访问专用配置文件。A private profile is accessible only to specific users or roles. 公共配置文件允许所有用户或角色访问邮件主机数据库 (msdb),以使用该配置文件发送电子邮件。A public profile allows any user or role with access to the mail host database (msdb) to send e-mail using that profile.

配置文件可以是默认的配置文件。A profile may be a default profile. 在这种情况下,用户或角色可以使用该配置文件发送电子邮件,而无需显式指定配置文件。In this case, users or roles can send e-mail using the profile without explicitly specifying the profile. 如果发送电子邮件的用户或角色具有默认的专用配置文件,则数据库邮件将使用该配置文件。If the user or role sending the e-mail message has a default private profile, Database Mail uses that profile. 如果用户或角色没有默认的专用配置文件,则 sp_send_dbmail 将使用 msdb 数据库的默认公共配置文件。If the user or role has no default private profile, sp_send_dbmail uses the default public profile for the msdb database. 如果用户或角色没有默认的专用配置文件,且该数据库也没有默认的公共配置文件,则 sp_send_dbmail 将返回错误。If there is no default private profile for the user or role and no default public profile for the database, sp_send_dbmail returns an error. 仅可以将一个配置文件标记为默认配置文件。Only one profile can be marked as the default profile.

公共Public

选择此选项可将指定的配置文件转为公共配置文件。Select this option to make the specified profile public.

配置文件名Profile Name

显示配置文件的名称。Displays the name of the profile.

默认配置文件Default Profile

选择此选项可将指定的配置文件转为默认配置文件。Select this option to make the specified profile the default profile.

仅显示现有的公共配置文件Show only existing public profiles

选择此选项将仅显示指定数据库中的公共配置文件。Select this option to show only public profiles in the specified database.

“管理配置文件安全性”,“专用”选项卡Manage Profile Security, Private Tab

使用此页可配置专用配置文件。Use this page to configure a private profile.

配置文件可以为公共配置文件或专用配置文件。Profiles are either public or private. 只有特定用户或角色才能访问专用配置文件。A private profile is accessible only to specific users or roles. 公共配置文件允许所有用户或角色访问邮件主机数据库 (msdb),以使用该配置文件发送电子邮件。A public profile allows any user or role with access to the mail host database (msdb) to send e-mail using that profile.

配置文件可以是默认的配置文件。A profile may be a default profile. 在这种情况下,用户或角色可以使用该配置文件发送电子邮件,而无需显式指定配置文件。In this case, users or roles can send e-mail using the profile without explicitly specifying the profile. 如果发送电子邮件的用户或角色具有默认的专用配置文件,则数据库邮件将使用该配置文件。If the user or role sending the e-mail message has a default private profile, Database Mail uses that profile. 如果用户或角色没有默认的专用配置文件,则 sp_send_dbmail 将使用 msdb 数据库的默认公共配置文件。If the user or role has no default private profile, sp_send_dbmail uses the default public profile for the msdb database. 如果用户或角色没有默认的专用配置文件,且该数据库也没有默认的公共配置文件,则 sp_send_dbmail 将返回错误。If there is no default private profile for the user or role and no default public profile for the database, sp_send_dbmail returns an error.

用户名User name

在 msdb 数据库中选择用户或角色的名称。Select the name of a user or role in the msdb database.

访问Access

选择该用户或角色是否可以访问指定的配置文件。Select whether the user or role has access to the specified profile.

配置文件名称Profile name

查看配置文件的名称。View the name of the profile.

是默认配置文件Is Default Profile

选择该配置文件是否为该用户或角色的默认配置文件。Select whether the profile is the default profile for the user or role. 每个用户或角色只能有一个默认配置文件。Each user or role may have only one default profile.

仅显示此用户的现有专用配置文件Show only existing private profiles for this user

选择此选项将仅显示指定的用户或角色可以访问的配置文件。Select this option to display only profiles that the specified user or role already has access to.

AccountRetryAttemptsConfigure System Parameters

使用此页可以指定数据库邮件系统参数。Use this page to specify Database Mail system parameters. 查看系统参数和每个参数的当前值。View the system parameters and the current value of each parameter. 选择某个参数可以在信息窗格中查看其简短说明。Select a parameter to view a short description in the information pane.

帐户重试次数Account Retry Attempts

外部电子邮件进程尝试使用指定配置文件中的每个帐户发送电子邮件的次数。The number of times that the external mail process attempts to send the e-mail message using each account in the specified profile.

帐户重试延迟时间(秒)Account Retry Delay (seconds)

在尝试使用配置文件中的所有帐户传递消息后,外部邮件进程在再次尝试使用所有帐户之前等待的时间(秒)。The amount of time, in seconds, for the external mail process to wait after it tries to deliver a message using all accounts in the profile before it attempts all accounts again.

最大文件大小(字节)Maximum File Size (Bytes)

附件的最大大小(以字节为单位)。The maximum size of an attachment, in bytes.

禁止的附件文件扩展名Prohibited Attachment File Extensions

一组以逗号分隔的扩展名,具有这些扩展名的文件不能作为电子邮件附件发送。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.

数据库邮件可执行文件的最短生存期(秒)Database Mail Executable Minimum Lifetime (seconds)

外部邮件进程保持活动状态的最少时间(以秒为单位)。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.

日志记录级别Logging level

指定数据库邮件日志中要记录的消息。Specify which messages are recorded in the Database Mail log. 可能的值包括:Possible values are:

普通 - 仅记录错误Normal - logs only errors

扩展 - 记录错误、警告和信息性消息Extended - logs errors, warnings, and informational messages

详细 - 记录错误、警告、信息性消息、成功消息和其他内部消息。Verbose - logs errors, warnings, informational messages, success messages, and additional internal messages. 使用详细日志记录可进行故障排除。Use verbose logging for troubleshooting.

默认值为“扩展”。Default value is Extended.

全部重置Reset All

选择此选项可将该页上的值重置为默认值。Select this option to reset the values on the page to the default values.

“完成向导”页Complete the Wizard Page

使用此页可以查看 “数据库邮件配置向导” 将要执行的操作。Use this page to review the actions that Database Mail Configuration Wizard will perform. 在完成该向导之前,不会进行任何更改。No changes are made until you finish the wizard.

Send Test E-Mail PageSend Test E-Mail Page

使用 从 发送测试电子邮件 页,可以使用指定的数据库邮件配置文件发送电子邮件。Use the Send Test E-Mail from page to send an e-mail message using the specified Database Mail profile. 只有 sysadmin 固定服务器角色的成员才可以使用此页发送测试电子邮件。Only members of the sysadmin fixed server role can send test e-mail using this page.

数据库邮件配置文件Database Mail Profile

从列表中选择数据库邮件配置文件。Select a Database Mail profile from the list. 这是必填字段。This is a required field. 如果没有显示配置文件,则没有配置文件或您不具有选择配置文件的权限。If no profiles are shown, there are no profiles or you do not have permission to a profile. 使用 数据库邮件配置向导 可以创建和配置配置文件。Use the Database Mail Configuration Wizard to create and configure profiles. 如果没有列出配置文件,请使用数据库邮件配置向导来创建要使用的配置文件。If no profiles are listed, use the Database Mail Configuration Wizard to create a profile for your use.

收件人To

电子邮件收件人的地址。The e-mail address of the message recipients. 至少需要一个收件人。At least one recipient is required.

主题Subject

测试电子邮件的主题行。The subject line for the test e-mail. 更改默认主题,以更好地标识电子邮件以进行故障排除。Change the default subject to better identify your email for troubleshooting.

正文Body

测试电子邮件的正文。The body of the test e-mail. 更改默认主题,以更好地标识电子邮件以进行故障排除。Change the default subject to better identify your email for troubleshooting.

“数据库邮件测试电子邮件”对话框确认数据库邮件尝试发送的测试消息,并为测试电子邮件提供 mailitem_id。The Database Mail Test E-Mail dialog box confirms that the test message that Database Mail attempted to send the message and provides the mailitem_id for the test e-mail message. 请与收件人核实以确定该电子邮件是否已到达。Check with the recipient to determine if the e-mail arrived. 通常几分钟后即可接收到电子邮件,但是由于网络速度较慢、邮件服务器上的邮件积压或服务器暂时不可用,该电子邮件可能会延迟。Normally e-mail is received in a few minutes, but the e-mail can be delayed because of slow network performance, a backlog of messages at the mail server, or if the server is temporarily unavailable. 使用 mailitem_id 以进行故障排除。Use the mailitem_id for troubleshooting.

发送电子邮件Sent e-mail

测试电子邮件的 mailitem_id 。The mailitem_id of the test e-mail message.

故障排除Troubleshoot

单击可打开联机丛书的 对数据库邮件进行故障排除主题。Click to open Books Online to the Troubleshooting Database Mailtopic.

模板Using Templates

创建数据库邮件配置脚本To create a Database Mail configuration script

在 “视图” 菜单上,选择 “模板资源管理器”。On the View menu, select Template Explorer.

在 “模板资源管理器” 窗口中,展开 “数据库邮件” 文件夹。In the Template Explorer window, expand the Database Mail folder.

双击“简单数据库邮件配置”。Double-click Simple Database Mail Configuration. 模板将在新的查询窗口中打开。The template opens in a new query window.

在 “查询” 菜单上,选择 “指定模板参数的值”。On the Query menu, select Specify Values for Template Parameters. 将打开 “替换模板参数” 窗口。The Replace Template Parameters window opens.

为 profile_name、 account_name、 SMTP_servername、 email_address 和 display_name 键入值。Type values for the profile_name, account_name, SMTP_servername, email_address, and display_name. SQL Server Management Studio 将使用您提供的值填充模板。SQL Server Management Studio fills in the template with the values you provide.

执行脚本来创建配置。Execute the script to create the configuration.

该脚本不授予任何数据库用户对配置文件的访问权限。The script does not grant any database users access to the profile. 因此,默认情况下,只有 sysadmin 固定安全角色的成员才可以使用该配置文件。Therefore, by default, the profile can only be used by members of the sysadmin fixed security role. For more information about granting access to profiles, see sysmail_add_principalprofile_sp (Transact-SQL)

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值