File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes HTML, CSS and JavaScript and the fly likes Convert Html Email to Plain Text Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Convert Html Email to Plain Text" Watch "Convert Html Email to Plain Text" New topic
Author

Convert Html Email to Plain Text

abhishek kaul
Greenhorn

Joined: May 13, 2010
Posts: 8

Hi all,

I have en email compose page where i have included a rich text editor.
So when the user composes the email it contains html tags.


I saw standard email clients and gmail, etc. They convert every html email content to Plain text email as well,
and attach it as a body part. So there is a text/plain and also text/html part in the mail. Thus when we receive the mail it shows the part (text/plain or text/html) depending on which format the user wants to see it in.

I am guessing the email clients parse through the html email, strip html tags and convert <br> <p> to line breaks, etc.

I wanted to know if there are any standard libraries in Java or something else perhaps which could do this html email to plain text email
conversion for me. Or do i have to write that code for myself.

I tried, but could not find any java libraries that do this. Need help !!

Thanks guys...
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Convert Html Email to Plain Text
 
Similar Threads
Java mail contentType..
Java Mail with different content type
Help required - ContentType "alternate"
Text Editor
passing html text in a java String object