Hi,
I have to read PST file one by one and save each mail into MSG format. but while loading or saving MSG i got exception like Unsupported File Format. Please provide me the reason and solution regarding this.
Please refer below code and sample to demonstrate the issue.
Source Code :-
MapiMessage f_objMapiMessage = null;
IGenericEnumerable f_mapiMessageCollection =
p_objFolderInfo.enumerateMapiMessages();
IGenericEnumerator f_Iterator = null;
f_Iterator = f_mapiMessageCollection.iterator();
while(f_Iterator.hasNext())
{
f_objMapiMessage = f_Iterator.next();
if (f_objMapiMessage != null && f_objMapiMessage.getMessageClass().equals(“IPM.Note”))
{
f_objMapiMessage.save(f_StrDestinationPath); // mapi message gets saved at the destination
}
}
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)
Thanks You
Ajinath Kharade
(Product Engineer)