An API that connects multiple Microsoft services, enabling data access and automation across platforms
Hello Julian Cram,
Thanks for reaching out. You can find a C# SendMail Graph API example here. Replace the line:
var requestBody = new Microsoft.Graph.Me.SendMail.SendMailPostRequestBody
with :
var requestBody = new Microsoft.Graph.Users.Item.SendMail.SendMailPostRequestBody
and line:
await graphClient.Me.SendMail.PostAsync(requestBody);
with
await graphClient.Users[UserID].SendMail.PostAsync(requestBody);
and change the emails To and From address and subject.
Some of the properties are required such as To Address for example and cannot be omitted.
If the reply is helpful, please click Accept Answer and kindly upvote it. If you have additional questions about this answer, please click Comment.
Thanks.