Friday, 04 August 2017 09:07

Convert EML/EMLX to MHTML or MSG in C#, VB.NET

Written by  support iceblue
Rate this item
(0 votes)

A file with the EMLX or EML file extension is a Mail Message file used to store an email message. EML/EMLX file can converted to MHTML or MSG file format with few lines of core code by using Spire.Email.

Convert EML/EMLX to MHTML

[C#]
MailMessage message = MailMessage.Load("example.eml");
message.Save("ToMhtml.mhtml", MailMessageFormat.Mhtml);
Console.WriteLine("Done");
[VB.NET]
Dim message As MailMessage = MailMessage.Load("example.eml")
message.Save("ToMhtml.mhtml", MailMessageFormat.Mhtml)
Console.WriteLine("Done")

Convert EML/EMLX to MSG

[C#]
MailMessage message = MailMessage.Load("example.eml");
message.Save("ToMsg.msg", MailMessageFormat.Msg);
Console.WriteLine("Done");
[VB.NET]
Dim message As MailMessage = MailMessage.Load("example.eml")
message.Save("ToMsg.msg", MailMessageFormat.Msg)
Console.WriteLine("Done")

Additional Info

  • tutorial_title: