Sent Date is set to current time while converting MSG to MBOX file using Aspose.Email for Java

The Sent Date is set to current time during msg save from MBOX file. In the uploaded mbox file when using the code below the printed date is right yet the datetime in the msg file is the current system time.

I can’t seem to get it fixed. A work around might be to reread the msg set the date then rewrite it out?

MboxrdStorageReader reader = new MboxrdStorageReader(new FileInputStream(MBOXfile), false);
MailMessage msg;
msg = reader.readNextMessage
System.out.println(“\n”+msg.getDate());“test.msg”, SaveOptions.getDefaultMsgUnicode());

this may be similar to Sent Time missing in PST file (1.0 MB)

Using the preserve functions resolved this issue.



Its good to know that you have resolved issue on your own. Please feel free to contact us any time.