【发布时间】:2013-08-20 21:51:01
【问题描述】:
从 SSRS 中的电子邮件订阅发送邮件时出现以下错误。
下面是配置部分:
<RSEmailDPConfiguration>
<SMTPServer>mysmtpserver addres</SMTPServer>
<SMTPServerPort>
</SMTPServerPort>
<SMTPAccountName>
</SMTPAccountName>
<SMTPConnectionTimeout>
</SMTPConnectionTimeout>
<SMTPServerPickupDirectory>
</SMTPServerPickupDirectory>
<SMTPUseSSL>
</SMTPUseSSL>
<SendUsing>2</SendUsing>
<SMTPAuthenticate>2
</SMTPAuthenticate>
<From>myid@domain.com</From>
<EmbeddedRenderFormats>
<RenderingExtension>MHTML</RenderingExtension>
</EmbeddedRenderFormats>
<PrivilegedUserRenderFormats>
</PrivilegedUserRenderFormats>
<ExcludedRenderFormats>
<RenderingExtension>HTMLOWC</RenderingExtension>
<RenderingExtension>NULL</RenderingExtension>
<RenderingExtension>RGDI</RenderingExtension>
</ExcludedRenderFormats>
<SendEmailToUserAlias>True</SendEmailToUserAlias>
<DefaultHostName>
</DefaultHostName>
<PermittedHosts>
</PermittedHosts>
</RSEmailDPConfiguration>
错误:
notification!WindowsService_0!1858!08/20/2013-05:48:02:: i INFO: Handling subscription f78a80f1-dd72-4215-b86a-96fa7391cfc0 to report ReportMenu, owner: mydomain\myid, delivery extension: Report Server Email.
library!WindowsService_0!1858!08/20/2013-05:48:02:: i INFO: RenderForNewSession('/ReportProject/ReportMenu')
library!WindowsService_0!1858!08/20/2013-05:48:04:: i INFO: Initializing EnableExecutionLogging to 'True' as specified in Server system properties.
emailextension!WindowsService_0!1858!08/20/2013-05:48:04:: e ERROR: Error sending email. Exception: System.Net.Mail.SmtpException: Mailbox unavailable. The server response was: 5.7.1 Client does not have permissions to send as this sender
at System.Net.Mail.DataStopCommand.CheckResponse(SmtpStatusCode statusCode, String serverResponse)
at System.Net.Mail.SmtpConnection.OnClose(Object sender, EventArgs args)
at System.Net.ClosableStream.Close()
at System.Net.Mail.MailWriter.Close()
at System.Net.Mail.SmtpClient.Send(MailMessage message)
at Microsoft.ReportingServices.EmailDeliveryProvider.EmailProvider.Deliver(Notification notification)
notification!WindowsService_0!1858!08/20/2013-05:48:04:: i INFO: Notification f06badda-98db-4aba-8a1f-26646430479b completed. Success: True, Status: Failure sending mail: Mailbox unavailable. The server response was: 5.7.1 Client does not have permissions to send as this sender, DeliveryExtension: Report Server Email, Report: ReportMenu, Attempt 0
有人可以帮忙吗?
【问题讨论】:
-
SSRS 服务在哪个用户下运行?是
myid@domain.com吗?由于您已经设置了身份验证,因此对于照顾您的 SMTP 服务器的人来说,这似乎是一个错误。 -
如何获取运行 SSRS 服务的用户?不确定 SMT 服务器是否有任何错误。因为我尝试从Powershell脚本发送邮件,所以邮件发送成功。
-
错误是直接来自 SMTP 服务器的权限问题:
Mailbox unavailable和5.7.1 Client does not have permissions to send as this sender。我怀疑对 SMTP 服务器进行身份验证的用户(即 SSRS 用户)与<From>myid@domain.com</From>值之间存在不匹配。您可以在 SQL Server 配置管理器中或在普通服务应用程序services.msc下看到 SSRS 服务用户。 -
报告服务器在 NT Service\ReportServer 下运行。我正在使用我的 ID(域\用户名)发送邮件。我现在应该如何进行?
-
尝试在您的域\用户名下运行 SSRS 作为测试。如果可行,我建议让域用户设置邮箱并在该用户下运行 SSRS 服务。
标签: reporting-services ssrs-2008 smtpclient