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

Free Support Forum - aspose.com

Convert PST to MBox


Any hint for converting PST to Mbox??
1 Like


Thank you for using Aspose.Email.

Aspose.Email provides the MailboxConverter class which provides the ConvertPersonalStorageToMbox method to facilitate conversion of PST to Mbox without any additional code. Please refer to the following code sample that converts PST to Mbox. Please feel free to contact us in case you need further assistance.

MboxStorageWriter writer = new MboxrdStorageWriter(“Test.mbox”, false);

PersonalStorage pst = PersonalStorage.FromFile(“PersonalStorage.pst”,false);

MailboxConverter.ConvertPersonalStorageToMbox(pst, writer, null);

1 Like

this code is creating new mbox file format from complete pst, but i want to export only selected folder, tell me how can i do it?


At present, the API doesn’t support creating folder/subfolders in an mbox file. You can read messages from a PST file folder(s) as per your requirement and add these to the mbox storage using the MBoxStorageWriter. Please note that PersonalStorage.ExtractMessage returns MapiMessage while MBoxStorageWrite writes a message to MBox in MailMessage structure. Thus, you need to convert the MapiMessage to MailMessage using the following sample code before adding to the Mbox storage.

Sample Code:

MailMessageInterpretor mi = MailMessageInterpretorFactory.Instance.GetIntepretor(mapiMsg.MessageClass);
MailMessage eml = mi.InterpretAsTnef(mapiMsg);

Any hint for converting PST to MBOX with folder structure?


Folder structure in MBox is not supported at the moment and there are no plans to implement the same in near future. Please use the information shared above where you should read each message for PST and add it to MBox using MailMessage. In case you come across any issue, please feel free to write to us.

how to give permission from admin account to user to fetch mails in office365??


Office365 Exchange allows to fetch mails from inbox without going into any permission settings. Please try it and the API should be able to fetch mails without the requirement of any explicit permissions.

Any hint to convert a olm file into pst??


There are no such plans for providing support for conversion of olm file to PST.

any hint for get all users list of a admin account in office365 impersonation??


I have tried to search any such option but afraid to share that no such function call is available to fetch list of users of an admin account.

how can i convert html to eml format??


You can do it using the following sample code:

HtmlLoadOptions opt = new HtmlLoadOptions


PrefferedTextEncoding = Encoding.UTF8,

ShouldAddPlainTextView = true,

PathToResources = @“D:\images”


MailMessage eml = MailMessage.Load(“test.html”, opt);

thank you sir…


You are welcome.

how can i get Cc and Bcc list from a lotus notes document?


Aspose.Email API provides MailMessage and MapiMessage classes to load known email file types and get the CC and BCC information. Could you please share such a document with us for further analysis at our end? We’ll look into it for assisting you further.

Thank you sir for sharing information…
But this problem is solved…


Thank you for sharing feedback. Feel free to write to us in case of any further query related to the API.