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

Free Support Forum - aspose.com

MessageInfo date information

I am writing an aspose application to parse through a outlook pst file and obtain some information about the contents.

I loop through folderInfoCollection obtaining the MessageInfo collection. Then loop through each MessageInfo. I am struggling to find any date information.

Searching through the API references I see there are getDate functions for things like POP3MessageInfo, but nothing for a PST messageInfo.

Could someone help me find some date information.

Many Thanks


Hi Stu,

Thank you for contacting Aspose support team.

I would like to share that currently no direct property is available in MessageInfo which can provide any sort of date. However you may consider the following sample code which extracts date property from the MessageInfo.Properties, if any type of date is available in the list.

PersonalStorage pst = PersonalStorage.fromFile(“D:/Aspose/outlook0.pst”);
FolderInfo folderInfo = pst.getRootFolder().getSubFolder(“TestFolder”);
MessageInfoCollection messageInfoCollection = folderInfo.getContents();
int iCount = messageInfoCollection.size();
for (int i = 0 ; i < iCount; i++)
MessageInfo messageInfo = messageInfoCollection.get_Item(i);
if (messageInfo.getProperties().contains(MapiPropertyTag.PR_LAST_MODIFICATION_TIME))
Date dt = messageInfo.getProperties().get_Item(MapiPropertyTag.PR_LAST_MODIFICATION_TIME).getDateTime();
// get the message in MapiMessage instance
MapiMessage message = pst.extractMessage(messageInfo);