I generated the .MHT file from .rtf file ( containing images and rich text) using aspose.words.Document:
Document doc = new Document(rtfPath);
doc.save(mhtPath, com.aspose.words.SaveOptions.createSaveOptions(SaveFormat.MHTML));
Now I created:
MapiMessage msg = MapiMessage.load(mhtPath, new MhtmlLoadOptions());
msg3.setSenderEmailAddress("testuser1@gmail.com");
msg3.setReplyTo("testuser2@gmail.com");
msg3.setSubject(“Test email .msg creation”);
msg3.save(msgfromrtfPath, SaveOptions.getDefaultMsg());
Though the .msg got created, I wasn’t able to open the generated .msg file from outlook.
Please let me know if there is anything wrong in this approach if not please let me know how I can create a .msg file from .rtf. Kindly note that .rtf file has some embedded image files in it.
Thanks,
Venkata