File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes EJB and other Java EE Technologies and the fly likes How to send inline images in body of an email Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "How to send inline images in body of an email" Watch "How to send inline images in body of an email" New topic

How to send inline images in body of an email

Bhushan Madan

Joined: Oct 27, 2004
Posts: 1
I need help on following thing :

1)I have an email client page similar to yahoo.
Show: To, Subject, Message Body & attachment fields.

2) When submit is clicked the email needs to be send to the recipient with the attachment in the email. The user should see that attachment as inline text. I mean similar to what you see when you get the email from which may have your invoice details plus some images inside the same page.

Now the trick is user will create this page in word document. It may contain newsletter, header, footer, images the way he wanna show it. He then saves that page he developed on his machine as web page from word document using save-as-web-page mode. & then he attaches that web page in that email client with browse button. The problem here what I see is the images will not get saved in that html document.

If I have somehow images & text in one document, I can do multipart form data (like in upload utility) & then either

1) Attach that page as an attachment mode & send that email. But user should see inline images.


2) Write in the message body the entire data & send as an email. This will make user see inline images.

I know one way is to store images on server & have relative path but can we do something different & sophisticated?
I agree. Here's the link:
subject: How to send inline images in body of an email
Similar Threads
Asynch response from server
how to generate reports in java
MS Word content in Javamail Message Body
creating a text file from JSP
Image as part of HTML email