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

Free Support Forum - aspose.com

FolderInfo with inbox and sended subfolder


I’m trying to optimize a mail backup process of my PST files.

I need to save in msg format only the inbox folder and the sended mail folder.

I can get the root folder using…

PersonalStorage pst = PersonalStorage.FromFile(@pstFilePath);
FolderInfo folderInfo = pst.RootFolder;

But this folder info iterates over Spam folder, Recycle Bin and outbox f.e.

I only need the inbox and sended and I used the methods…
FolderInfo folderRecibido = folderInfo.GetSubFolder(“Bandeja de entrada”);
FolderInfo folderEnviado = folderInfo.GetSubFolder(“Elementos enviados”);

But it only works if the PST file is generated by a Spanish exchange server.
I would like to wonder if anybody can help me with a little snippet to gente the folderInfo of Inbox programatically independent of the folder and pst language.

Thanks in advance.


Hi Alex,

Thank you for writing to us.

You can access these folders using the following lines of code. Please feel free to contact us if you have any additional query/inquiry.


FolderInfo folderInfoInbox = pst.GetPredefinedFolder(StandardIpmFolder.Inbox);

FolderInfo folderInfoSentItems = pst.GetPredefinedFolder(StandardIpmFolder.SentItems);