Microsoft Graph - 使用 sendMail API 时电子邮件传送失败

Nin*_*Ak3 5 microsoft-graph-api

我在遇到问题https://graph.microsoft.com/v1.0/users/ <用户id > / sendmail的。

我收到 202 Accepted 作为响应,但是当我浏览到上面的用户邮箱时,我收到如下的传递失败通知:

Delivery has failed to these recipients or groups:

<username>@outlook.com
Your message wasn't delivered because the recipient's email provider rejected it.
Run Code Online (Sandbox Code Playgroud)
Remote Server returned '550 5.7.708 Service unavailable. Access denied, traffic not accepted from this IP. For more information please go to http://go.microsoft.com/fwlink/?LinkId=526653 AS(7171) [SYBPR01MB4428.ausprd01.prod.outlook.com]'
Run Code Online (Sandbox Code Playgroud)

当我登录 Outlook 并从 < userId > 的 Outlook向 < username >@outlook.com发送电子邮件时,电子邮件已成功发送。

有谁知道这里发生了什么?

我尝试添加 SMTP 连接器,但没有解决问题。当 SMTP 连接器发送电子邮件以测试出站电子邮件时,它可以正常工作,因为我可以在<_username_>@outlook.com.

Mar*_*eur 1

如果您点击提供的链接,它会解释发生的情况

5.7.708 访问被拒绝,不接受来自该 IP 的流量

来自该租户的大部分流量已被检测为可疑,并导致该租户的发送能力被禁止。

确保任何妥协或开放中继已得到解决,然后通过常规渠道联系支持人员。

有关详细信息,请参阅修复 Exchange Online 中错误代码 5.7.700 到 5.7.750 的电子邮件传递问题。

  • 我用来发送电子邮件的电子邮件地址是 *.onmicrosoft.com 帐户之一。奇怪的是,通过 Outlook 发送电子邮件工作正常,只是当我使用 API 时却不行。 (2认同)