title: EWS Managed API : Reply to a message while adding an internet header
body: <p>I am building a small client that can automatically reply to some emails. I would like to add a custom internet header to these replies.</p>
  
  <p>What I tried to do is to set the extended property to the email I receive, and use the <code>EmailMessage.Reply</code> method.</p>
  
  <p>But it does not work. I also tried to use the <code>EmailMessage.CreateReply</code>. However, it creates a <code>ResponseMessage</code> object that has no <code>SetExtendedProperty</code> method.</p>
  
  <p>This the relevant part of the code :</p>
  
  <pre><code>private static readonly ExtendedPropertyDefinition _redFlag = new ExtendedPropertyDefinition(DefaultExtendedPropertySet.InternetHeaders, "X-RED", MapiPropertyType.String);
  private static readonly PropertySet _customHeaders = new PropertySet(BasePropertySet.FirstClassProperties, _redFlag);
  
  /* ... some code to connect to Exchange Service ... */
  
  EmailMessage email = EmailMessage.Bind(_service, id, _customHeaders);
  email.SetExtendedProperty(_redFlag, "test");
  email.Reply(new MessageBody(answer), false);
  </code></pre>