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

Free Support Forum - aspose.com

Sent date format in mailbox on fowarded emails

Is there a way to change the date format when forwarding an email message?

Someone sent an email from outlook exchange server and when the sender goes to their sent items and opens up the sent email it shows the email sent as Wednesday, February 08, 2017 1:25 PM.

I use the example code below to pick up the email on the exchange inbox and then forward the email. When the email gets forwarded then the recipient of the forwarded email sees the email sent date aa Wednesday, February 08, 2017 1:24:51 PM.

Notice the difference in time, one is not showing the seconds and is 1:25 PM. And the other is showing the seconds and is 1:24:51 PM.

Is there a way to forward the message and have the sent date formatted so the time will not include the seconds? This way the time would match what is shown in the senders sent items?

Here is the example code to forward the message.

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);

Hi,

Thank you for contacting Aspose Support team.

We found no such possibility as part of the API to format date in the message being forwarded. Please let us know if you have any further query in this regard.