title: Exhange Web Service: Angle brackets in cid/ContentId results in broken Inline attachments
body: <p>We are using a servicedesk application which is sending out e-mail using Exhange Web Service (EWS). But when sending e-mail with images (usually screenshots) the images is not showing.
  When right clicking an choosing view source in Outlook, we can se that the broken image har coding like this:</p>
  <pre><code>&lt;img width=100 height=100 id=&quot;1&quot; src=&quot;cid:&amp;lt;helge.jpg&amp;gt;&quot;&gt;.
  </code></pre>
  <p>The image is broken also on webmail client like Gmail, Outlook.com.</p>
  <p>The funny thing is that the image is displaying correctly when sending from the Servicedesk application to a user one the same Exchange server.</p>
  <p>Our programmers have looked at the documentation for EWS:</p>
  <p><a href="https://msdn.microsoft.com/en-us/library/office/hh532564%28v=exchg.80%29.aspx?f=255&amp;MSPPError=-2147217396" rel="nofollow noreferrer">https://msdn.microsoft.com/en-us/library/office/hh532564%28v=exchg.80%29.aspx?f=255&amp;MSPPError=-2147217396</a></p>
  <p>And the programmers of the ServiceDesk applcation have provived the code they use for EWS:</p>
  <pre><code>fileAttachment.ContentId = string.Concat(&quot;&lt;&quot;, str, &quot;&gt;&quot;);
  </code></pre>
  <p>So based on the example from Microsoft, they add &lt; and &gt; around the id, but the example from Microsoft does not.</p>
  <p>Our programmers made a explample using :</p>
  <pre><code>email.Attachments[0].ContentId = &quot;WithoutAnglebrackets.jpg&quot;;
  email.Attachments[1].ContentId = &quot;&lt;WithAnglebrackets.jpg&gt;&quot;;
  </code></pre>
  <p>This resulted that the first attachment is showing in the Email, but not the other.</p>
  <p>The servicedesk programmers is refering to <a href="https://www.rfc-editor.org/rfc/rfc2392" rel="nofollow noreferrer">https://www.rfc-editor.org/rfc/rfc2392</a>, that the anglebrackets is allow.</p>
  <p>They also is telling us that the application is working on their Exchange 2010. (We are using Exchange 2013).</p>
  <p>So is this a Exchange problem? Or the the programmer wrong with adding anglebrackets?</p>