Hi Team,
I am using aspose email java 21.5 but not able to set timezone property while converting EML to MHT
Please suggest me some sample code.
Thanks
Swapnil
Hi Team,
I am using aspose email java 21.5 but not able to set timezone property while converting EML to MHT
Please suggest me some sample code.
Thanks
Swapnil
@ssherekar,
Thank you for the query. You can set the timezone for an email message and then convert the message to MHT file as shown below:
MailMessage mailMessage = MailMessage.load(dataPath + "test.eml");
mailMessage.setTimeZoneOffset(5 * 60 * 60 * 1000); // 5 hours
MhtSaveOptions mhtOptions = new MhtSaveOptions();
mhtOptions.setMhtFormatOptions(MhtFormatOptions.WriteHeader);
mailMessage.save(dataPath + "test.mhtml", mhtOptions);
More examples: Loading and Saving Message
API Reference: MailMessage Class