交易失败。服务器响应为:5.2.0 STOREDRV.Submission.Exception:SendAsDeniedException.MapiExceptionSendAsDenied;

时间:2020-02-26 02:56:49

标签: email

有人可以帮助我解决以下问题。我们已经将smtp更改为office365,但是在更改smtp主机之后,我们开始遇到以下问题

交易失败。服务器响应为:5.2.0 STOREDRV.Submission.Exception:SendAsDeniedException.MapiExceptionSendAsDenied;由于消息“无法提交消息”的永久性异常,无法处理消息。

2 个答案:

答案 0 :(得分:2)

SMTP协议(MAIL From:<salesperson1@contoso.com>)中使用的电子邮件地址必须与您的Office365帐户名相同,即“ salesperson1@contoso.com”。

来源:检查此Microsoft support页,该页与打印机和扫描仪有关:

“您的打印机或应用程序必须使用您在设置电子邮件时输入登录凭据的地址发送电子邮件。如果打印机或应用程序尝试从其他帐户发送电子邮件,则会导致类似于以下错误:

5.7.60 SMTP; Client does not have permissions to send as this sender.

例如,如果您在应用程序设置中输入了sales@contoso.com的登录凭据,但是应用程序尝试从salesperson1@contoso.com发送电子邮件,则不支持此操作。对于这种情况,请改用Microsoft 365或Office 365 SMTP中继。”

在我们的情况下,地址不匹配导致office365.com答复以下错误消息:

554 5.2.0 STOREDRV.Submission.Exception:SendAsDeniedException.MapiExceptionSendAsDenied; Failed to process message due to a permanent exception with message Cannot submit message.

,并已按照说明解决。

答案 1 :(得分:0)

如果使用 Asp.net/c#,请确保 NetworkCredential 中使用的发件人 ID 与发件人电子邮件地址类似,如下所示:

MailServer.Credentials = new System.Net.NetworkCredential(SenderId, SenderPass);
MailAddress from = new MailAddress(SenderId);