Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

c# outlook add-in convert msg to eml

Tags:

c#

outlook

eml

Is there any way to read a mail within outlook (using an add-in) and save it as an EML file?

like image 602
Andrei S Avatar asked Oct 24 '22 15:10

Andrei S


1 Answers

You can go two ways to achieve your goal:

  1. You can do it programmatically. Try to use a third-party library Aspose.Email for .Net. This is a great library, which can be used for basic email management features. In this case, we will use a converting. Furthermore, this library is able to manipulate and edit messages, send and receive emails via several protocols and work with message storage files.

With the following code, you can easily convert MSG to EML. Look how simple it is with Aspose.Email for .NET.

using (var message = Aspose.Email.MailMessage.Load("template.msg»))
{  
    message.Save("output.eml", Aspose.Email.SaveOptions.DefaultEml); 
}
  1. Use online converters. If you don’t want to do it programmatically, you can do it with online converters. You can use Aspose.Email Conversion. This is a free online converter, which provides you with converting from MSG to a bunch of different file formats. It has a friendly user-interface.

I am a Developer Evangelist at Aspose.

like image 87
Artemiy Gazizyanov Avatar answered Nov 12 '22 21:11

Artemiy Gazizyanov