Quantcast
Channel: Aspose.Email Product Family
Viewing all articles
Browse latest Browse all 1367

ArgumentException: Offset or count were out of bounds - Java Email

$
0
0
Hi, 

In the most recent version of the Java Email library I'm seeing the following error when trying to extract messages from a PST in EML format: 


class com.aspose.email.system.exceptions.ArgumentException: Offset or count were out of bounds
com.aspose.email.internal.ai.c.a(Unknown Source)
com.aspose.email.internal.b.e.a(Unknown Source)
com.aspose.email.internal.b.e.a(Unknown Source)
com.aspose.email.MailMessageInterpretor.a(Unknown Source)
com.aspose.email.MailMessageInterpretor.loadMessageBodyHtml(Unknown Source)
com.aspose.email.MailMessageInterpretor.loadMessageBody(Unknown Source)
com.aspose.email.MailMessageInterpretor.interpret(Unknown Source)
com.emlextract.AsposeMessageConverter.extractEmlFile(AsposeMessageConverter.java:154)

Here is the calling code: 

private void extractEmlFile(FolderInfo folderInfo, PersonalStorage pst) {

MessageInfoCollection messageInfoCollection = folderInfo.getContents();

MessageInfo messageInfo = (MessageInfo) messageInfoCollection.get(0);

MapiMessage message = pst.extractMessage(messageInfo);

MailMessageInterpretorFactory.getInstance().getIntepretor(message.getMessageClass()).interpret(message).save("my_eml_file.eml",MessageFormat.getEml());

}


Any help would be appreciated. 

Thanks


Viewing all articles
Browse latest Browse all 1367

Trending Articles