poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nick Burch <nick.bu...@alfresco.com>
Subject Re: Read .msg file inside other .msg file
Date Tue, 10 Jul 2012 09:37:04 GMT
On 10/07/12 07:31, lucaro wrote:
>   can anyone help me, How to read .msg file inside another .msg file.

They're stored as a special kind of attachment

First up, get the attachments
http://poi.apache.org/apidocs/org/apache/poi/hsmf/MAPIMessage.html#getAttachmentFiles()

Loop over the attachment chunks, looking for one with a directory that 
isn't null:
http://poi.apache.org/apidocs/org/apache/poi/hsmf/datatypes/AttachmentChunks.html#attachmentDirectory

On the directory chunk, get the embedded message, and process just as 
you would a regular message
http://poi.apache.org/apidocs/org/apache/poi/hsmf/datatypes/DirectoryChunk.html#getAsEmbededMessage()

Nick

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


Mime
View raw message