Dec 21 2022 01:30 AM - edited Dec 21 2022 01:46 AM
Hello
I am able to save email messages from office 365 outlook server with attachments. For this I am getting stream of a message and saving this stream to a msg file.
var message = await graphClient.Users[emailId].Messages[key].Content.Request().GetAsync()
using (FileStream outputFileStream = new FileStream(Path.Combine(path,r.Next() + ".ics"), FileMode.Create))
{
message.CopyTo(outputFileStream);
}
In case of calendar event, I am able to save that event but attachments are missing for it.
How do I save calendar events/meetings to ics file with attchments?