Importing Email

VSTO

Below is the code to import email using VSTO Outlook.


  string FilePath = @"E:\Aspose\Aspose VS VSTO\Sample Files\ImportEmail.msg";

 Outlook.MailItem email = (Outlook.MailItem)Application.Session.OpenSharedItem(FilePath);       

Aspose.Email

Below is the code to import email using aspose.email for .NET.


string FilePath = @"E:\Aspose\Aspose VS VSTO\Sample Files\ImportEmail.msg";

// Load from MSG with default options
MailMessage eml = MailMessage.Load(FilePath, new MsgLoadOptions());

Download Source Code

Download Running Example