Mail converter
Console application for converting e-mail files between EML(MIME) and MSG(Outlook) formats.
Mail converter is a sample command line application for converting email messages between MIME (*.eml) and Outlook MSG (*.msg) formats.
Usage is simple:
Syntax: MailConverter.exe -tomime|-tomsg sourcepath targetpath
Example: MailConverter.exe -tomsg C:\mail.eml C:\mail.msg
Example: MailConverter.exe -tomime C:\mail.msg C:\mail.eml
Following code demonstrates how it's done:
C#
// load a mail
MailMessage mail = new MailMessage();
mail.Load(path);
// save as MIME
mail.Save(filename + ".eml", MailFormat.Mime);
// save as Outlook MSG
mail.Save(filename + ".msg", MailFormat.OutlookMsg);
VB.NET
' load a mail
Dim mail As MailMessage = New MailMessage()
mail.Load(path)
' save as MIME
mail.Save(filename + ".eml", MailFormat.Mime)
' save as Outlook MSG
mail.Save(filename + ".msg", MailFormat.OutlookMsg)
See https://www.rebex.net/mail-converter/ for a more powerful version of this app with extra features, such as conversion of multiple files.