您好我正在嘗試使用 Microsoft graph api 發送訊息。
以前,我使用不帶附件的圖形 API 發送訊息/電子郵件。現在我需要每個附加 10 個附件。
所以我查找了示例并找到了 Microsoft 檔案,它顯示了以下代碼
GraphServiceClient graphClient = new GraphServiceClient( authProvider );
var attachment = new FileAttachment
{
Name = "smile",
ContentBytes = Convert.FromBase64String("R0lGODdhEAYEAA7")
};
await graphClient.Me.Messages["{message-id}"].Attachments
.Request()
.AddAsync(attachment);
鏈接:

轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/461056.html
標籤:电子邮件 asp.net-core-mvc 微软图形 API 电子邮件附件
