We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Sent Date of an email in PST


Is it possible to get the Sent Date of emails in a PST file using Aspose.email.outlook.Pst.MessageInfo class.


Thank you for contacting Aspose support team.

There is no property in MessageInfo which can be used to retrieve the sent date. However you may please use following sample code to retrieve the sent date or any other property from the PST without extracting the complete message. Please give it a try and share the feedback with us.

PersonalStorage pst = PersonalStorage.FromFile("sample.pst");
FolderInfo info = pst.RootFolder.GetSubFolder("Inbox");
MessageInfoCollection messageInfoCollection = info.GetContents();

foreach (MessageInfo msgInfo in messageInfoCollection)
    MapiProperty mapiProp =
    pst.ExtractProperty(msgInfo.EntryId, MapiPropertyTag.PR_DELIVER_TIME);
    if (mapiProp != null)
        DateTime dt = mapiProp.GetDateTime();