Msg2txt - Apache POI Outlook Email Example


What is Msg2txt example in the Apache POI package? How to run Msg2txt example?



Msg2txt example in the Apache POI package is created by Bruno Girin. It reads one or several Outlook email (*.msg) files and for each of them creates a text file from available chunks and a directory that contains attachments.

Msg2txt example uses the Horrible Stupid Mail Format (HSMF) API, which supports Outlook email files in *.msg format.

Here is the command to run Msg2txt to convert Outlook email file in *.msg file format.

   -cp .;C:\local\poi-3.15\poi-examples-3.15.jar;
   org.apache.poi.hsmf.examples.Msg2txt yahoo.msg

Note that the yahoo.msg file was created with Outlook by saving the Yahoo daily stories email.

If you open the output file, yahoo.txt, in Notepad editor, you will see text extracted from the Outlook email file:

From: Yahoo
To: Trump, John
Subject: Your Daily Yahoo stories for Wednesday




Downloading Older Versions of Apache POI Java Library

Other Apache POI Examples

Other Apache POI Examples

⇑⇑ FAQ for Apache POI (Poor Obfuscation Implementation)

2017-02-08, 2465🔥, 0💬