Reading HTML messages containing images
2 posts in topic
Flat View  Flat View

Posted By:   Fethi_Ouali
Posted On:   Sunday, May 27, 2001 10:27 AM

Hi !
I'm building a web-based mail interface with JavaMail API.
I'm using for that a servlet that accesses the mail account using IMAP and retrieves the messages to the client.
When a message is an HTML message that contains an image, the image is not displayed but the HTML is interpreted.
How should I proceed to display the images ?

Thanks in advance :o)

Re: Reading HTML messages containing images

Posted By:   Niraj_Bhatt  
Posted On:   Wednesday, September 26, 2001 09:14 PM

Sorry for asking a question in this reply. We are facing one problem and i think u can answer us.

We want to show an html page in email. The message is

MIME-Version: 1.0
Content-Type: multipart/alternative;

This is a multi-part message in MIME format.

Content-Type: text/plain;
Content-Transfer-Encoding: quoted-printable

html mail

Content-Type: text/html;
Content-Transfer-Encoding: quoted-printable


html mail


For this message we are dropping the 0th part since it is containing a plain text version of mail. When we do a getBodyPart(1) on this Multipart message we get the object of InputStream. But I need to append this content in my html file where in I show From, To, Cc and subject. Please help..how can i achive this.

Nt: We are using servlet/html combinition.


Niraj Bhatt

Re: Reading HTML messages containing images

Posted By:   John_Zukowski  
Posted On:   Sunday, May 27, 2001 01:19 PM

If the URL is absolute (http://www....), the browser should handle the fetching of the image. However, if the image is a cid: URL, and the parts are related, then it is your responsibility to pull the image out of the message and serve the image accordingly. This is what client-side tools like Eudora/Outlook do.

To see what the message structure looks like, see the FAQ for creating the message with embedded images and work in reverse.

About | Sitemap | Contact