poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 45804] [PATCH] hsmf -- MAPIMessage does not work with Outlook 3.0 .msg files
Date Mon, 15 Sep 2008 14:51:05 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=45804


Randall Scarberry <drrandys@yahoo.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEEDINFO                    |ASSIGNED




--- Comment #3 from Randall Scarberry <drrandys@yahoo.com>  2008-09-15 07:51:04 PST
---
For the attached .msg file, all of the string items in the message have labels
of the form: "__substg1.0_0078001F".  The last 8 hex digits are comprised of
the chunkId and the type.  For test.msg, the type is always 0x001F. The chunkId
varies depending on whether it's the subject, text body, from, to etc..  

But the StringChunk class, without my changes, always uses 0x001E as the type,
so the methods of MAPIMessage always throw a ChunkNotFoundException.  The
message items are stored in a hash map in an object of POIFSChunkParser.  These
items are supposed to be retrieved using the appropriate StringChunks as keys. 
The new constructor for StringChunk lets me create appropriate StringChunks for
my .msg files.

I could've fixed the problem by redefining Types.STRING as 0x001F in
org.apache.poi.hsmf.datatypes.Types.  But I figured that 0x001E probably works
with whatever .msg files this was first developed for.

Maybe the lib could detect the version of the .msg file and define the
StringChunk type appropriately as either 0x001E or 0x001F.




-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

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


Mime
View raw message