jstedfast / MailKit

A cross-platform .NET library for IMAP, POP3, and SMTP.

Home Page:http://www.mimekit.net

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Sending MimeMessage using Mircosoft Graph

dgxhubbard opened this issue · comments

Does MailKit have a supported way of converting MimeMessage to the JSON expected
by Microsoft Graph?

SmtpClient used to work on outlook 365, but now fails. So with this article
we can send a simple json formatted message. We use MailKit and MimeMessage in a lot of places in our code but I don't see a simple way to convert MimeMessage to the JSON expected by graph.

Does this feature exist now or can it be added?

It looks to me like you can send in MIME format and that's what I'd recommend doing.

The problem with trying to serialize MIME to JSON is that the Outlook JSON message format is not likely to be the same as the JMAP JSON message format (JMAP is a newer standard that is more-or-less a replacement for IMAP based on JSON & HTTP REST).

And then there's Google's JSON message format as well for GMail.

And I'd bet my life on them all being different.