Hi there,
Hi Lee,
MailMessage eml = <span style=“font-size:10.0pt;font-family:Consolas;mso-fareast-font-family:“Times New Roman”;
mso-bidi-font-family:Consolas;color:#7F0055”>new MailMessage(<span style=“font-size:10.0pt;font-family:Consolas;mso-fareast-font-family:“Times New Roman”;
mso-bidi-font-family:Consolas;color:#2A00FF”>"from@domain.com",<span style=“font-size:10.0pt;
font-family:Consolas;mso-fareast-font-family:“Times New Roman”;mso-bidi-font-family:
Consolas;color:#2A00FF”>"to@domain.com",<span style=“font-size:10.0pt;
font-family:Consolas;mso-fareast-font-family:“Times New Roman”;mso-bidi-font-family:
Consolas;color:#2A00FF”>“Subject”,<span style=“font-size:10.0pt;font-family:Consolas;
mso-fareast-font-family:“Times New Roman”;mso-bidi-font-family:Consolas;
color:#2A00FF”>“Body”);<span style=“font-size:10.0pt;font-family:Consolas;
mso-fareast-font-family:“Times New Roman”;mso-bidi-font-family:Consolas”><o:p></o:p>
eml.isDraft(false);
MapiMessage message = MapiMessage.fromMailMessage(eml);
String s = "Transport Headers";
byte[] b = s.getBytes(Charset.forName("UTF-8"));
MapiProperty property = new MapiProperty(MapiPropertyTag.PR_TRANSPORT_MESSAGE_HEADERS, b);
message.setProperty(property);
message.save("1.msg");
Thanks for your reply, it was a useful pointer but this resulted in garbage being saved.
Hi Lee,