В примере ниже показано, как поместить простой текст в свойство Comment, но я хочу, чтобы он выглядел более сложным, например:< /p>
"Привет, автор запроса!
Ваша электронная почта в порядке.
С уважением"
Код: Выделить всё
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Me.Messages.Item.Reply;
using Microsoft.Graph.Models;
var requestBody = new ReplyPostRequestBody
{
Message = new Message
{
ToRecipients = new List
{
new Recipient
{
EmailAddress = new EmailAddress
{
Address = "samanthab@contoso.com",
Name = "Samantha Booth",
},
},
new Recipient
{
EmailAddress = new EmailAddress
{
Address = "randiw@contoso.com",
Name = "Randi Welch",
},
},
},
},
Comment = "Samantha, Randi, would you name the group please?",
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
await graphClient.Me.Messages["{message-id}"].Reply.PostAsync(requestBody);
Подробнее здесь: https://stackoverflow.com/questions/791 ... in-c-sharp