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

Free Support Forum - aspose.com

Adding header to ExchangeMessageInfo

I have a solution where I need to parse incoming mails in an inbox, which is stored in Office 365.
I’m using the ExchangeEWS client, and I can connect, read mails, and convert messages to MailMessage just fine, and have access to all the data from the mail.

The issue is, that depending on the content of the mail, I need to add a specific header to the mail, and save it back to the mailbox.

I have tried using the UpdateItems method, by creating a new ExchangeStreamedItem class. I saved the updated MailMessage to a stream and converted it to a byte array. I have then tried sending it to Exchange EWS with different ID’s (MailMessage.MesageId and ExchangeMessageInfo.UniqueUri), but I always get an error back. I am unsure of if it is the byte array of the updated message, og if it’s the ID. Anyway, I have been unable to post the mail back to the EWS for updating.

Do you have a sample on how to post back updates to an existing mail using the EWS client?

Kind regards


Thank you for contacting Aspose Support.

We followed the steps that you mentioned to update email using EWSClient.UpdateItems(). It did not generate an error, but we were unable to update the email.

We have logged a ticket in our issue tracking system as EMAILNET-39214 to investigate this scenario in detail. We will update you here as soon as additional information is available.

The issues you have found earlier (filed as EMAILNET-39214) have been fixed in this update.