我在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
有人可以为此提供帮助吗?
答案 0 :(得分:3)
根据例外情况,问题来自SMTP服务器:
状态:发送邮件失败:邮箱不可用。服务器响应 是:5.7.1客户端无权作为此发件人发送
由于您在配置中将SMTPAuthenticate
设置为2
,因此SSRS服务用户将尝试向SMTP服务器进行身份验证。有关详细信息,请参阅Configure a Report Server for E-Mail Delivery。
您需要解决此问题 - 由于SSRS在NT Service\ReportServer
下运行并尝试将邮件作为<From>myid@domain.com</From>
发送,因此SMTP服务器将不允许此操作,从而导致错误。
作为测试,您可以将SSRS服务用户更改为myid@domain.com
作为检查以确认这是问题。
如果是这样,您应该调查使用邮箱设置域用户并在该用户下运行SSRS服务。
您的另一个选择是从配置中删除身份验证选项(即将SMTPAuthenticate
设置为0
)并允许对SMTP服务器进行匿名身份验证,但您的环境可能不允许这样做。