Bug 62701

Summary: Introduce an API to generate .msg files
Product: POI Reporter: Ramesh <bramesh.ppl>
Component: HSMFAssignee: POI Developers List <dev>
Status: NEEDINFO ---    
Severity: enhancement    
Priority: P2    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: All   

Description Ramesh 2018-09-10 05:28:30 UTC
POI supporting to reading a msg files but not providing any API to write or generate MSG files from java code. We are expecting to introduce an API to generate .MSG files
Comment 1 Nick Burch 2018-09-10 10:35:55 UTC
You should find that many of the low-level records support writing out, which ought to help. Creating a whole new file is probably a lot of work to start with, I'd suggest you focus on just the change case to begin with (updating the various properties and streams in sync), then simpler add/remove (with references and IDs and stuff), then if you're still keen push for full creation!

See http://poi.apache.org/devel/guidelines.html for some help on getting started contributing to Apache POI. We'll look forward to your patches / pull requests!
Comment 2 Ramesh 2018-09-25 08:56:09 UTC
I could able to create .msg files using java code with plain text body but wants to extend the same to support HTML content as well.
To make HTML support, what are things required so that i can upload the patch if it is done from my end.
A small piece of code that am using right now.

if(body!=null) { topLevelChunk.setProperty(new PropertyValue(MAPIProperty.BODY, FLAG_READABLE | FLAG_WRITEABLE, StringUtil.getToUnicodeLE(body))); }

Any help here is greatly useful and solves lot of problems