title: MIME Emails - PDF and Content-ID
body: <p>We are sending Emails using The MIME-Format.
  (Underlying language is Java, using MultiPartEmail).</p>
  
  <p>It has been reported by customers that their system reads the .pdf-Attachment of our emails twice. </p>
  
  <p>The reason for this is, apparently, the lack of a Content-ID for the attachment.</p>
  
  <p>I'm trying to fix this but found really vague information about the content-ID. Reading the standard i figured it is just supposed to be some unique ID in the form of <code>&lt;ID@domain&gt;</code>.</p>
  
  <p>So i added this into our email generation, so that the "slot" which references the .pdf-attachment looks something like this:</p>
  
  <pre><code>------=_Part_0_12345667890
  Content-Type: application/pdf; 
  name=theName.pdf
  Content-Transfer-Encoding: base64
  Content-Disposition: attachment; 
  filename=theName.pdf
  Content-ID: &lt;1431939868331@domain&gt;
  </code></pre>
  
  <p>Is that all there is about it? The number is current time in milliseconds. 
  I'm unclear about the domain. Is it critical that this domain is exactly the right one? </p>
  
  <p>And how can i understand this Content-ID attribute? Is it simply what i think it is: an ID so that attachments can be uniquly referenced by some email-systems or is there more to it? Why is the domain important? </p>
  
  <p>Edit: I don't know if its related, but it seems the .pdf-Attachment doesnt show in the iPhone Mail software. I can't think of any other reason it would not show, as .pdf is surely supported and the files are also quite small. (The icon of an attachment shows in the overview-list but the attachment is nowhere referenced in the opened email)</p>