I am using aspose email to forward an email message from exchange. The email is forwarding, but the recipient is receiving the email in text format and not in the original html format.
Is there a way to forward the email and keep it in html format?
I just want to be able to forward the email keeping the original format.
Setting the MailMessage.IsBodyHtml flag worked and fixed the original issue, but I noticed the Sent date that is showing in the detail section of the email that was forward is in the wrong time zone.
The exchangeMessageInfo properties is showing the "prior email"DateTimeSent as:
02/03/2017 1:17:42 PM
But when the email is forwarded the email is showing:
02/03/2017 5:17:42 PM
Is there a way to get the forwarded email to have the “prior email” show the correct time zone?
We are unable to observe any difference in ExchangeMessageInfo.Date and the date time of the forwarded message. ExchangeMessageInfo.Date is in UTC and it reflected the same in the forwarded message.
Please share your complete sample code to reproduce the issue at our end. We’ll look into it further to assist you accordingly.
When forwarding messages using the example code below that you sent me, it is forwarding the message using the UTC time zone.
Is there a way to forward the message using the eastern time zone?
For example, someone on the eastern time zone sent an email and it went into inbox on the eastern time zone at 13:17:42. If I take this message and forward it to a different person on the eastern time zone, then when they see the forwarded message in their inbox they see the original email sent date in UTC time as 17:17:42 and not 13:17:42.
Here is the code that you had sent me and that I am using to forward the email.
var mailMessage = new MailMessage("from@domain.com", "to@domain.com", “Forward Message”, “This message is forwarded”);
mailMessage.IsBodyHtml = true;
IEWSClient _client = EWSClient.GetEWSClient(“https://servername/ews/exchange.asmx”, "from@domain.com", “password”);
ExchangeMessageInfo exchangeMessageInfo = _client.ListMessages(“Inbox”).First();
_client.Forward(mailMessage,
exchangeMessageInfo);
The Time zone information is associated with the message by the Exchange server and Aspose.Email API doesn’t have control over it. TimezoneId property specified by IEWSClient provides the provision to set timzone context of headers for server requests. However, if you still notice any differences of this behavior as compared to MS Outlook, please share with us your findings for further analysis at our end. We’ll look into these for assisting you further.