Hi there,
I am trying to load msg files to pst using Aspose.Email.dll(ver 5.3.0.0). I wrote following code
MailMessageLoadOptions loadOptions = new MailMessageLoadOptions();
loadOptions.MessageFormat = MessageFormat.Msg;
Obj_MailMessage = MailMessage.Load(pMsgPath, loadOptions);
But it is not giving me appropriate results.It does not show Sent date time and received date time at all. But I checked original msg in Outlook spy it has sent date time.
Please help.
Hi Shital,
Hi Shital,
MailMessage provides sent date whereas MapiMessage can be used to retrieve both the Sent and Received date. You may please give a try to the following sample code which displays these dates and let us know the feedback.
MailMessage mail = MailMessage.Load("password protected pdf file.msg", new MsgLoadOptions());
Console.WriteLine("Date = " + mail.Date);
MapiMessage mapi = MapiMessage.FromFile("password protected pdf file.msg");
Console.WriteLine("Delivery Time = " + mapi.DeliveryTime);
Console.WriteLine("ClientSubmitTime = " + mapi.ClientSubmitTime);