Hi,
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 =
p_objFolderInfo.enumerateMapiMessages();
IGenericEnumerator f_Iterator = null;
f_Iterator = f_mapiMessageCollection.iterator();
m_MboxrdStorageWriter = new MboxrdStorageWriter(f_MboxFile.getAbsolutePath(),false);
while(f_Iterator.hasNext())
{
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);
m_MboxrdStorageWriter.writeMessage(f_objMailMessage);
}
}
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)