This is part of the Exchange settings, and unfortunately, you will need to extract the original content from WinMail.dat using JTNEF .
"The Java TNEF package is an open source TNEF message handler implementation that can be used as a command-line utility or integrated with Java-based mail applications to retrieve the original content of the message."
This can be found in third-party JavaMail tools.
Alternatively and one that looks simpler, POI-HMEF
Sample extraction:
public void extract(String winmailFilename, String directoryName) throws Exception { HMEFContentsExtractor ext = new HMEFContentsExtractor(new File(winmailFilename)); File dir = new File(directoryName); File rtf = new File(dir, "message.rtf"); if(! dir.exists()) { throw new FileNotFoundException("Output directory " + dir.getName() + " not found"); } System.out.println("Extracting..."); ext.extractMessageBody(rtf); ext.extractAttachments(dir); System.out.println("Extraction completed"); }
There is also a sample for printing content here .
source share