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

Free Support Forum - aspose.com

MBOX is not open after reading the PST file using Aspose.Email FOR JAVA API

I have to read PST file and store messages in Aspose MBOX storage. But after creating mbox there is no any mail show in it. I have checked it on Apple Mail. Please refer the below code and sample example.

**source code :- **
MapiMessage f_objMapiMessage = null;
IGenericEnumerable f_mapiMessageCollection =
IGenericEnumerator f_Iterator = null;

f_Iterator = f_mapiMessageCollection.iterator();
m_MboxrdStorageWriter = new MboxrdStorageWriter(f_MboxFile.getAbsolutePath(),false);
f_objMapiMessage = f_Iterator.next();
if (f_objMapiMessage != null && f_objMapiMessage.getMessageClass().equals(“IPM.Note”))
MailConversionOptions f_mailConversionOption = new MailConversionOptions();
f_objMailMessage = p_objMapiMessage.toMailMessage(f_mailConversionOption);

source sample :-

Link :- [http://downloads.systoolsgroup.com/installer/Zero_Mail/Zero_Mail_MBOX_Fail.pst.zip ](http://downloads.systoolsgroup.com/installer/Zero_Mail/Zero_Mail_MBOX_Fail.pst.zip)

** Screen shots of after open mbox :- **
Screen Shot 2017-11-15 at 2.24.47 PM.jpg (92.7 KB)


We have evaluated the attached PST file. We are able to read the message inside PST file, store message into MBox and then read the message inside MBox storage. The only issue that was observed in you code is that you are not extracting information from SubFolder. Sample code to read SubFolder is given below for your reference. Try it at your end and update us with your feedback.


 com.aspose.email.PersonalStorage pst = com.aspose.email.PersonalStorage.fromFile("Zero_Mail_MBOX_Fail.pst");
 com.aspose.email.FolderInfo folderInfo = pst.getRootFolder();
 com.aspose.email.FolderInfoCollection folderInfoCollection = pst.getRootFolder().getSubFolders();
 com.aspose.email.FolderInfo folderInfo_ = (com.aspose.email.FolderInfo) folderInfo.getSubFolder("test mail fail");

Please open created mbox from PST file in apple mail client and give me screen shots.


Further investigation on the issue shows that issue persists. The issue has been logged into our system with ID EMAILJAVA-34326 for resolution. You will be automatically notified once any update or a fix version available in this regard.