how to read HTML email by JavaMail?
2 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Leo_Chan
Posted On:   Friday, July 27, 2001 02:05 AM

If someone send a HTML format email to a user. How to use JavaMail to read the HTML format email. I try to use message.getContent() or cast to mimemessage. But I still can't get the email content. I just get something like, javax.mail.internet.MimeMultipart@3e3bb2

Please help,
THANKS

Re: how to read HTML email by JavaMail?

Posted By:   John_Zukowski  
Posted On:   Friday, August 10, 2001 08:17 AM

Getting message content is already covered in the FAQ. The fact that it is HTML is irrelevant to getting the content. You then have to display the content in a JEditorPane or through a JSP page or something.

Re: how to read HTML email by JavaMail?

Posted By:   hari_haran  
Posted On:   Wednesday, August 1, 2001 11:27 PM

Multipart multipart = (Multipart)currentMessage.getContent();

Part p = multipart.getBodyPart(partnumber);

p.getContent()


try this code out if you are using
jsp then replace the last line of

code with

<%=p.getContent()%>
for more on this contact me at

hariharan@trellisys.net
About | Sitemap | Contact