[英]Sending emails between accounts using Microsoft Graph using Azure AD produces invalid IP error
I registered a daemon app in Azure AD and am creating a class to do some basic things like send and delete emails but I get an error when trying to send between two @*.onmicrosoft.com email boxes.我在公元 Azure 注册了一个守护程序应用程序,并正在创建一个 class 来做一些基本的事情,比如发送和删除电子邮件,但是当我尝试在两个 @*.onmicrosoft.com email 框之间发送时出现错误。 I am able to send from Gmail to these emails for example but not between the two emails for some reason.
例如,我可以从 Gmail 发送到这些电子邮件,但由于某种原因不能在两封电子邮件之间发送。
The way I am sending emails is as follows:我发送邮件的方式如下:
public async Task Send(string[] to, string subject, string body, FileInfo[] attachments = null, bool saveToSentItems = true, bool isBodyHTML = false)
{
var msg = new Message
{
Subject = subject,
Body = new ItemBody { ContentType = (isBodyHTML) ? BodyType.Html : BodyType.Text, Content = body },
ToRecipients = to.ToList().Select(x => new Recipient() { EmailAddress = new EmailAddress { Address = x } })
};
await graphClient.Users[email].SendMail(msg, saveToSentItems).Request().PostAsync();
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.