Hard Delete item recovery from PST/OST

Hi guys,


We know that exists a lot of tools to recover deleted items from PST/OST files, but this tools requires manual intervention, and we need a automatic solution using an API like Aspose.Email, because we process thousands of files in our System.

Actually we are using your component to process many pst/ost files, but we found that in the processing we are losing a lot of hard deleted items that also exists inside this stores.

We know that MAPI library use a method to get the Hard Deleted Items, as you can see in the Example below, the variable itemType is used to get the type of items you can get from the Pst Folder

–TO GET NORMAL EMAILS INSIDE A FOLDER
IMAPITable tblFolderObjects;
itemType = 0;
hr = fldFolder.GetContentsTable(itemType, out tblFolderObjects);

–TO GET NORMAL SUBFOLDERS INSIDE A FOLDER
IMAPITable tblFolderObjects;
itemType = 0;
hr = fldFolder.GetHierarchyTable(itemType, out tblFolderObjects);

–TO GET HARD DELETED EMAILS INSIDE A FOLDER
IMAPITable tblFolderObjects;
itemType = 2;
hr = fldFolder.GetContentsTable(itemType, out tblFolderObjects);

–TO GET HARD DELETED SUBFOLDERS INSIDE A FOLDER
IMAPITable tblFolderObjects;
itemType = 2;
hr = fldFolder.GetHierarchyTable(itemType, out tblFolderObjects);

As you can see the hard deleted items could be retrieved from the Pst Folder like the another normal emails only changing the parameter of the Mapi methods.
We can develop a MAPI component to get this type of items, but if we do this, then need to maintain and support 2 different components to get all items (normal and deleted) in the Pst.

Our main requirement if it is posible that you can add a feature in the Aspose.Email component to get the HardDeleted Items (Emails and Folders) inside the PST/OST files.

We will appreciate your help

Best Regards

Hi Gerardo,


Thank you for writing to us.

We’ll discuss the possibility of any such implementation of this feature with our development team and will write back our feedback here.

Hi Gerardo,

Thank you for your patience.

After discussing this issue with our development team, I have come to know that hard deleted items facility can’t be provided in Aspose.Email, as there is no flag like ‘SHOW_HARD_DELETES’, but ‘SHOW_SOFT_DELETES’ flag is present as can be seen from GetContentsTable description for example. Even, the soft deleted messages can’t be restored as this feature is provided by [MS Exchange](http://support.microsoft.com/kb/232265/en-us?fr=1%20also) only, but not by pure PST.

If you have any other query/inquiry related to Aspose.Email, please feel free to write. We’ll be glad to assist you further.

Hi Kashif,

Thanks for your answer.
As I understand Aspose.Email has the same limitation as MAPI.

As we know the Soft Deleted Items still exists in the orphaned OST file, if you can read an orphaned OST file without need to connect to a Exchange Server why you can not read these items inside the OST file?

We will appreciate your comments

Best Regards

Hi Gerardo,


My apologies for a delayed response.

I am afraid but I don’t have exact information available in this regard right now and have requested our development team for assistance via issue id: NETWORKNET-33858. As soon as there is some information available in this regard, I’ll update you accordingly.