title: How to stop embedded images in email being displayed as attachments by GMail?
body: <p>I am sending HTML emails with embedded images (as attachments) and the images display as expected in GMail. However they also show up as attachments under the email. Does anyone know how to avoid this i.e. I want them in the email only and not listed as attachments. I have used "Content-Disposition: inline". I am using Spring and JavaMail.</p>
  
  <p>Here is what my mails end up like. Can anyone see whats wrong?</p>
  
  <pre><code>Delivered-To: ...
  ...
  Subject: ...
  MIME-Version: 1.0
  Content-Type: multipart/mixed; 
      boundary="----=_Part_0_1248835444.1288246311187"
  
  ------=_Part_0_1248835444.1288246311187
  Content-Type: multipart/related; 
      boundary="----=_Part_1_592250078.1288246311197"
  
  ------=_Part_1_592250078.1288246311197
  Content-Type: text/html; charset=us-ascii
  Content-Transfer-Encoding: 7bit
  Content-Disposition: inline
  
  &lt;html&gt;
  &lt;body&gt;
  &lt;p&gt;&lt;img src="cid:a0"/&gt;&lt;/p&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  ------=_Part_1_592250078.1288246311197
  Content-Type: image/x-png
  Content-Transfer-Encoding: base64
  Content-Disposition: inline
  Content-ID: &lt;a0&gt;
  
  iVBORw0KGgoAAAANSUhEUgAAAPAAAABQCAYAAAAnSfh8AAAACXBIWXMAAC4jAAAuIwF4pT92AAAA
  ...
  Qcz8hzyUxqGHjkNbsY4Df5iBg6OIwafQHBxFjP8PAIwl43uhncLdAAAAAElFTkSuQmCC
  ------=_Part_1_592250078.1288246311197--
  
  ------=_Part_0_1248835444.1288246311187--
  </code></pre>