Sending a reply email using exchange web services - how to deal with the changeKey property -


For my code, I receive an unread message from the exchange, processing something based on that message, and Then respond to the message I did with the results of the processing.

The problem I have is that when I try to answer the email, I get an error when I answer. message. () Or SendAndSave (): Response message:

  Current ChangeKey is required for this operation   

Below is the code that I'm running that this error Is triggering:

  public invalid answerToEmail (email message _mail message, string _reply) {string serviceManager = emailServerAddress = ConfigurationSettings.AppSettings ["serviceManagerEmail"]. Trim (); Feedback message response message = _emailMessage.CreateReply (true); ResponseMessage.BodyPrefix = _reply; String change = _emailMessage.Id.ChangeKey; If (! ServiceManager.Equals ("")) {responseMessage.CcRecipients.Add (new email address (service manager)); } ResponseMessage.Send (); }   

I am able to check the price via the _MailMessage changeKey value_emailMessage.id.Changekey and there is a value, I expected that the response will be assigned when _emailMessage.createReply () The call was made.

I was unable to find any reference to this issue during the search, I was hoping someone

I went ahead with this problem Next, after setting the message IsRead = true and saving the updates on the server. It changes ChangeKey, so it is no longer valid.

Try to _emailMessage.Load () to receive messages from the server again, and the new ChangeKey.

Comments

Popular posts from this blog

Python SQLAlchemy:AttributeError: Neither 'Column' object nor 'Comparator' object has an attribute 'schema' -

java - How not to audit a join table and related entities using Hibernate Envers? -

mongodb - CakePHP paginator ignoring order, but only for certain values -