We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

The time zone is not set while converting EML file to MHTML

Hi,
The time zone is not set properly for some samples of EML file while converting to MHTML.

@Shital_diwate,
Thank you for the issue description. Please check the problem with the latest version of Aspose.Email. If the issue persists, please share the following:

  • input EML file
  • code example demonstrating the problem
  • output MHTML file
  • screenshot with the problem

@Andrey_Potapov
I tried this using Aspose.Email 21.5 jar, but getting same result.
MHTML Time zone issue.zip (2.8 KB)
here is the samples and output file.
Please check and help me to solve this issue.

@Shital_diwate,
Thank you for the file examples. Please try to set the time zone for the mail message as shown below:

MailMessage mailMessage = MailMessage.Load(dataPath + "Message.eml");
mailMessage.TimeZoneOffset = new TimeSpan(0, 5, 0, 0); // 5 hours

More examples: Loading and Saving Message
API Reference: MailMessage.TimeZoneOffset Property

If the issue persists, please share the following:

  • your code example demonstrating the problem
  • actual and expected time zone in output