Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3314956
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T22:17:37+00:00 2026-05-17T22:17:37+00:00

I am sending HTML emails with embedded images (as attachments) and the images display

  • 0

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.

Here is what my mails end up like. Can anyone see whats wrong?

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

<html>
<body>
<p><img src="cid:a0"/></p>
</body>
</html>
------=_Part_1_592250078.1288246311197
Content-Type: image/x-png
Content-Transfer-Encoding: base64
Content-Disposition: inline
Content-ID: <a0>

iVBORw0KGgoAAAANSUhEUgAAAPAAAABQCAYAAAAnSfh8AAAACXBIWXMAAC4jAAAuIwF4pT92AAAA
...
Qcz8hzyUxqGHjkNbsY4Df5iBg6OIwafQHBxFjP8PAIwl43uhncLdAAAAAElFTkSuQmCC
------=_Part_1_592250078.1288246311197--

------=_Part_0_1248835444.1288246311187--
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T22:17:38+00:00Added an answer on May 17, 2026 at 10:17 pm

    It is possible to get such a mail body out of GMail by following these steps:

    1. enable in Gmail Labs “Inserting images by Kent T”
    2. write an mail and embed an image into the mail
    3. send the mail to yourself
    4. open the mail. On the upper right corner, press the picture with the arrow down (right near Reply) and press “Show original”. There you will find an example of such a mail.

    I did this and got following result, where the image is not listed as attachement. Maybe this mail body helps you to create a proper mail with Spring and JavaMail:

    MIME-Version: 1.0
    ...
    Subject: ...
    From: ...
    To: ...
    Content-Type: multipart/related; boundary=000e0cd62fb69a9c280493a7a1c0
    
    --000e0cd62fb69a9c280493a7a1c0
    Content-Type: multipart/alternative; boundary=000e0cd62fb69a9c250493a7a1bf
    
    --000e0cd62fb69a9c250493a7a1bf
    Content-Type: text/plain; charset=ISO-8859-1
    
    [image: abc.png]
    
    --000e0cd62fb69a9c250493a7a1bf
    Content-Type: text/html; charset=ISO-8859-1
    
    <img src="cid:ii_12bf191c5eab934e" alt="abc.png" title="abc.png"><br>
    
    --000e0cd62fb69a9c250493a7a1bf--
    --000e0cd62fb69a9c280493a7a1c0
    Content-Type: image/png; name="abc.png"
    Content-Transfer-Encoding: base64
    Content-ID: <ii_12bf191c5eab934e>
    X-Attachment-Id: ii_12bf191c5eab934e
    
    iVBORw0KGgoAAAANSUhEUgAAAJ4AAADLCAIAAAAQpL1oAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAA
    ...
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am sending email through gmail, i want to send some html content, is
I have a wxPython application that sends multipart emails with HTML and embedded images.
I am sending html emails through php . the email has a background image
Looking at Mailgun as a good solution for sending HTML email to a large
Is there a better way to generate HTML email in C# (for sending via
I am sending out an email, and the message ($message) is in HTML I
So, Rails has the wonderful capability of sending plaintext emails alongside HTML emails. You
I have tried sending and HTML formatted email using ACYmailing for Joomla AND Mailchimp.
I am sending both html and text mime parts trough gmail smtp...(my domain is
I am sending and email that has embedded anchor tag to an image tag

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.