Reporting Services 数据警报功能会在电子邮件中发送警报。 若要发送电子邮件,可能需要配置 Reporting Services 服务应用程序,并可能需要修改该服务应用程序的电子邮件传递扩展插件。 如果计划将电子邮件传递扩展插件用于 Reporting Services 订阅功能,则还需要进行电子邮件设置。
适用于:Reporting Services SharePoint 模式 |SharePoint 2010 和 SharePoint 2013。 |
为共享服务配置电子邮件
在 SharePoint 管理中心中,单击 “应用程序管理”。
在 “服务应用程序” 组中,单击 “管理服务应用程序”。
在“名称”列表中,单击你的 Reporting Services 服务应用程序名称。
在“管理 Reporting Services 应用程序”页上,单击“电子邮件设置”。
选择 “使用 SMTP 服务器”。
在 “出站 SMTP 服务器” 框中,键入 SMTP 服务器的名称。
在“发件人地址”框中,键入电子邮件地址。
此地址为所有警报电子邮件的发件人。
“发件人地址”中指定的用户帐户必须是为 Reporting Services 服务应用程序配置应用程序池时指定的托管帐户。 如果您具有权限,则可以在 SharePoint 管理中心的“服务帐户”页上查看现有托管帐户的列表。
单击 “确定” 。
NTLM 身份验证
如果你的电子邮件环境需要 NTLM 身份验证且不允许匿名访问,则需要修改 Reporting Services 服务应用程序的电子邮件传递扩展插件配置。 对 SMTPAuthenticate 进行更改,令其使用值“2”。 无法从用户界面更改此值。 以下 PowerShell 脚本示例更新了名为“SSRS_TESTAPPLICATION”的服务应用程序的报表服务器电子邮件传递扩展插件的完全配置。 请注意,此脚本中列出的某些节点(例如“发件人”地址)也可从用户界面进行设置。
$app = Get-SPRSServiceApplication | Where {$_.name -like "SSRS_TESTAPPLICATION *"} $emailCfg = Get-SPRSExtension -Identity $app -ExtensionType "Delivery" -Name "Report Server Email" | Select -ExpandProperty ConfigurationXml $emailXml = [xml]$emailCfg $emailXml.SelectSingleNode("//SMTPServer").InnerText = "your email server name" $emailXml.SelectSingleNode("//SendUsing").InnerText = "2" $emailXml.SelectSingleNode("//SMTPAuthenticate").InnerText = "2" $emailXml.SelectSingleNode("//From").InnerText = "your FROM email address" Set-SPRSExtension -Identity $app -ExtensionType "Delivery" -Name "Report Server Email" -ExtensionConfiguration $emailXml.OuterXml
如果需要验证服务应用程序的名称,请运行 Get-SPRSServiceApplication cmdlet。
Get-SPRSServiceApplication
以下示例将返回名为“SSRS_TESTAPPLICATION”的服务应用程序的电子邮件扩展插件的当前值。
$app = get-sprsserviceapplication | Where {$_.name -like "SSRSTEST_APPLICATION*"} Get-SPRSExtension -Identity $app -ExtensionType "Delivery" -Name "Report Server Email" | Select -ExpandProperty ConfigurationXml
以下示例将使用名为“SSRS_TESTAPPLICATION”的服务应用程序的电子邮件扩展插件的当前值创建名为“emailconfig.txt”的新文件
$app = Get-SPRSServiceApplication | Where {$_.name -like "SSRS_TESTAPPLICATION*"} Get-SPRSExtension -identity $app -ExtensionType "Delivery" -name "Report Server Email" | Select -ExpandProperty ConfigurationXml | Out-File c:\emailconfig.txt