Hi I tried all that sample code i was able to run that already. What i need is how to message in the inbox.
Here is my sample code
PersonalStorage pst = PersonalStorage.create(dataDir + “MapiContactToPST_out.pst”, FileFormatVersion.Unicode);
MailMessage message = new MailMessage();
MapiMessage mapiMessage = new MapiMessage();
mapiMessage. setReplyTo("rodel@rodel.com");
mapiMessage.setSubject("This is a demo Subject");
mapiMessage.setBody("<b>This line is in bold.</b> <br/> <br/>\"\n" +
" + \"<font color=blue>This line is in blue color</font>\"");
mapiMessage.getReplyTo();
mapiMessage.getSubject();
mapiMessage.getBodyHtml();
FolderInfo inboxFolder = pst.createPredefinedFolder("myInbox", StandardIpmFolder.Inbox);
//MapiMessage msg = MapiMessage.fromMailMessage();
inboxFolder.addMessage(mapiMessage);
// Create an instance of MapiMessage and load the MailMessag instance into it
MapiMessage mapiMsg = MapiMessage.fromMailMessage(message);
// Set the MapiMessageFlags as UNSENT and FROMME
mapiMsg.setMessageFlags(MapiMessageFlags.MSGFLAG_UNSENT | MapiMessageFlags.MSGFLAG_FROMME);
// Save the MapiMessage to disk
pst.saveAs(dataDir + "MapiContactToPST_out.pst", FileFormatVersion.Unicode);
//mapiMsg.save(dataDir + "New-Draft.msg");
What im trying to do is put message in the inbox.
Please refer to the screen shot i attachedaspose mail.PNG (37.3 KB)
additional details.
Thank you so muxh