Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
MSG or EML Emails to HTML or MHTML in C#
// Load email file
MailMessage mailMsg = MailMessage.Load("mail.eml");
// Convert email to HTML
mailMsg.Save("email-to-html.html", SaveOptions.DefaultHtml);
// Load email file
MailMessage mailMsg = MailMessage.Load("mail.msg");
// Convert email to MHTML
mailMsg.Save("email-to-html.html", SaveOptions.DefaultMhtml);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment