When upgrading from Aspose Email version 22.6 to 23.8 and a special patch version 23.8.0.1, we’re noticing that the getClientSubmitTime API appears to be returning the document’s Modified Date value which isn’t necessarily the time that the email was actually submitted. Why the change in behavior? I could modify a document and then mail it days later so this change isn’t intuitive and presents misleading information to our users.
Note that we’ve raised a similar issue before with this behavior before and a special option was added at one point but things seem to have changed again. Here’s the previous Aspose email issue we raised: Sent Date on Email Returns Current Time - #17 by andrey.potapov
Code sample (sample email file attached). Note the difference in behavior where version 22.6 returned an Aspose Zero Date for the ClientSubmitTime whereas versions 23.8.x appear to be returning the document’s Modified Date value. In this sample document, the client submit time is returned as “Sep 19, 2023 05:54 PM” the same as the Date Modified and Date Created.Epiq Sample Test.zip (66.6 KB)
MsgLoadOptions mlo = new MsgLoadOptions();
mlo.setKeepOriginalEmailAddresses(setKeepOriginalEmailAddresses);
MailMessage mailMessage = MailMessage.load(“Epiq Sample Test.msg”, mlo);
MapiConversionOptions mco = MapiConversionOptions.getUnicodeFormat();
// keep empty dates when converting a message
mco.setPreserveEmptyDates(true);
MapiMessage mapiMessage = MapiMessage.fromMailMessage(mailMessage, mco);
System.out.println(mapiMessage.getClientSubmitTime()); // zero date
// check special “Aspose” zero date
if (mapiMessage.getClientSubmitTime().equals(ASPOSE_ZERO_DATE))
System.out.println(“ZERO DATE”);
else
System.out.println(“Client Submit Time=” + mapiMessage.getClientSubmitTime());