We are trying to preserve the Original dates of attachments inside an Email file with .eml file extension.(This is happening for all .eml files with attachments. generated from aspose.email)
But we are unable to find an option to do the same. this is causing all attachments to be saved as new files (saved with current time as created and modified dates) every time they are downloaded from .eml file (using save-as option against the attachment in Microsoft outlook)
But, We could find an option for .msg files using the below option: MsgSaveOptions options = new MsgSaveOptions(MailMessageSaveType.OutlookMessageFormatUnicode); options.setPreserveOriginalDates(true);
Can you please help us with information how we can achieve the same for “.eml” files?
Note: We owe “Aspose.Email for Java” license and currently running on 19.2 version, we tried to find if latest version of the same library has this capability but could not find the same on 22.2 Aspose.Email
Looking forward to hear from you !
Thanks in Advance
We have logged a ticket to add PreserveOriginalDates property in EmlSaveOptions class as EMAILJAVA-35032 in our issue tracking system. We will inform you via this forum thread once this feature is available.
Could you please attach the following resources here for testing:
Your input file.
Please attach the output file that shows the undesired behavior.
Please attach the expected output file that shows the desired behavior.
Please create a sample Java application (source code without compilation errors) that helps us to reproduce your problem on our end and attach it here for testing.
As soon as you get these pieces of information ready, we will start investigation into your issue and provide you more information. Thanks for your cooperation.
PS: To attach these resources, please zip and upload them.
Attached the sample .eml output that shows the behavior I’m talking about. test.zip (103.3 KB)
How to reproduce info:
Extract the zip file and store the .eml file in some local location
Open the eml file in Microsoft Outlook (as per our usage), save the attachment available under the eml to local directory using “save as” option.
Once the attachment is saved to local, open the attachment properties and check for the “created date”, “modified date” and “accessed date”.
These dates are supposed to be:
Created: 03 February 2022, 6.52.38 PM
Modified: 16 March 2022, 11.31.35 AM
Accessed: When the attachment is saved to local disk
but they are coming like:
Created: When the attachment is saved to local disk
Modified: When the attachment is saved to local disk
Accessed: When the attachment is saved to local disk
I’m afraid I won’t be able to provide the application code here, I would suggest an easy way to reproduce this.
Send/Receive an email to/from with attachment and convert that .msg file to eml file using your aspose msg-eml-online-converter.
Could you please attach your input EML that contains the attachment? It is difficult to say what the problem is without EML and code. Thanks for your cooperation.