【问题标题】:Error While sending a mail from Email subscription in SSRS从 SSRS 中的电子邮件订阅发送邮件时出错
【发布时间】: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 unavailable5.7.1 Client does not have permissions to send as this sender。我怀疑对 SMTP 服务器进行身份验证的用户(即 SSRS 用户)与 &lt;From&gt;myid@domain.com&lt;/From&gt; 值之间存在不匹配。您可以在 SQL Server 配置管理器中或在普通服务应用程序services.msc 下看到 SSRS 服务用户。
  • 报告服务器在 NT Service\ReportServer 下运行。我正在使用我的 ID(域\用户名)发送邮件。我现在应该如何进行?
  • 尝试在您的域\用户名下运行 SSRS 作为测试。如果可行,我建议让域用户设置邮箱并在该用户下运行 SSRS 服务。

标签: reporting-services ssrs-2008 smtpclient


【解决方案1】:

根据例外情况,问题来自 SMTP 服务器:

状态:发送邮件失败:邮箱不可用。服务器响应 原为:5.7.1 客户端无权以此发件人身份发送

因为您在配置中将SMTPAuthenticate 设置为2,SSRS 服务用户将尝试对 SMTP 服务器进行身份验证。详情请见Configure a Report Server for E-Mail Delivery

您需要解决此问题 - 由于 SSRS 在 NT Service\ReportServer 下运行并尝试以 &lt;From&gt;myid@domain.com&lt;/From&gt; 发送邮件,因此 SMTP 服务器将不允许这样做,因此会出现错误。

作为测试,您可以将 SSRS 服务用户更改为 myid@domain.com 作为检查以确认这是问题所在。

如果是这样,您应该调查让域用户设置邮箱并在该用户下运行 SSRS 服务。

您的另一个选项是从配置中删除身份验证选项(即将SMTPAuthenticate 设置为0)并允许对 SMTP 服务器进行匿名身份验证,尽管在您的环境中可能不允许这样做。

【讨论】:

猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2019-12-08
  • 2023-03-03
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多