<p>I would like to read the text and binary attachments in a saved Outlook message (.msg file) from a Java application, without resorting to native code (JNI, Java Native Interface). </p>

<p><a href="http://poi.apache.org/hsmf/index.html" rel="noreferrer">Apache POI-HSMF</a> seems to be in the right direction, but it's in very early stages of development... </p>

[{'answer_id': 66030, 'author': 'Alan Krueger', 'author_id': 7708, 'author_profile': 'https://Stackoverflow.com/users/7708', 'pm_score': 3, 'selected': True, 'text': "<ul>\n<li><p>You could use Apache POIFS, which\nseems to be a little more mature,\nbut that would appear to duplicate the efforts of POI-HSMF.</p></li>\n<li><p>You could use POI-HSMF and contribute changes to get the\nfeatures you need working.  That's\noften how FOSS projects like that expand.</p></li>\n<li><p>You\ncould use com4j, j-Interop, or some\nother COM-level interop feature and\ninteract directly with the COM\ninterfaces that provide access to\nthe structured document.  That would\nbe much easier than trying to hit it\ndirectly through JNI.</p></li>\n</ul>\n"}, {'answer_id': 66034, 'author': 'Vasco Duarte', 'author_id': 9362, 'author_profile': 'https://Stackoverflow.com/users/9362', 'pm_score': -1, 'selected': False, 'text': '<p>Have you tried to use Jython with the Python win32 extensions (<a href="http://www.jython.org/Project/" rel="nofollow noreferrer">http://www.jython.org/Project/</a> + <a href="http://python.net/crew/mhammond/win32/" rel="nofollow noreferrer">http://python.net/crew/mhammond/win32/</a>)? \nIf this is for a "personal" or "internal" project Jython with Python may be a very good choice. If you are building a "shrink wrapped" software package this may not be the best option.</p>\n'}, {'answer_id': 3305723, 'author': 'RealHowTo', 'author_id': 25122, 'author_profile': 'https://Stackoverflow.com/users/25122', 'pm_score': 3, 'selected': False, 'text': '<p><a href="http://auxilii.com/msgparser/" rel="noreferrer">msgparser</a> is a small open source Java library that parses Outlook .msg files and provides their content using Java objects. msgparser uses the <a href="http://poi.apache.org/poifs/" rel="noreferrer">Apache POI - POIFS</a> library to parse the message files which use the OLE 2 Compound Document format. </p>\n'}, {'answer_id': 30901700, 'author': 'Harshit', 'author_id': 5016747, 'author_profile': 'https://Stackoverflow.com/users/5016747', 'pm_score': -1, 'selected': False, 'text': '<p>Apache POI-HSMF.</p>\n\n<p>You can start from the example given in below link.\n<a href="http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/examples/src/org/apache/poi/hsmf/examples/Msg2txt.java?revision=821500&amp;view=markup&amp;pathrev=821500" rel="nofollow">http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/examples/src/org/apache/poi/hsmf/examples/Msg2txt.java?revision=821500&amp;view=markup&amp;pathrev=821500</a></p>\n\n<p>Further read library docs.</p>\n'}]
['https://Stackoverflow.com/questions/65936', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/7111/']