title: Does Gmail set an invalid Content-ID header for inline attachments?
body: <h1>Short Version</h1>
  <p>A Content-ID header on an attachment must be of the form <code>local-part &quot;@&quot; domain</code>. Gmail's Content-IDs do not have an <code>@</code> in them. <strong>Is this a real bug, or am I misreading the spec?</strong></p>
  <h1>Long Version</h1>
  <p>I noticed this problem when I tried to resend an email sent from Gmail that has an inline image attached. My mailer (SwiftMailer) claimed that the Content-ID was invalid.</p>
  <p><a href="https://gist.github.com/lyoshenka/8834238" rel="nofollow noreferrer">Here's the email I'm working with</a>. I created this by inserting an image inline in Gmail and emailing it to myself.</p>
  <p>Here are the relevant parts of the spec (as far as I can tell):</p>
  <p><a href="https://www.rfc-editor.org/rfc/rfc2045#section-7" rel="nofollow noreferrer">RFC 2045</a></p>
  <pre><code>Content-ID Header Field
  
  In constructing a high-level user agent, it may be desirable to allow
  one body to make reference to another.  Accordingly, bodies may be
  labelled using the &quot;Content-ID&quot; header field, which is syntactically
  identical to the &quot;Message-ID&quot; header field:
  
   id := &quot;Content-ID&quot; &quot;:&quot; msg-id
  </code></pre>
  <p>RFC 822 <a href="https://www.rfc-editor.org/rfc/rfc822#appendix-D" rel="nofollow noreferrer">here</a> and <a href="https://www.rfc-editor.org/rfc/rfc822#section-6" rel="nofollow noreferrer">here</a></p>
  <pre><code>msg-id      =  &quot;&lt;&quot; addr-spec &quot;&gt;&quot;            ; Unique message id
  
  addr-spec   =  local-part &quot;@&quot; domain        ; global address
  </code></pre>
  <p>What am I missing here? Is Gmail not following the spec, or is it ok not to have an <code>@</code> in the Content-ID?</p>