• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Convert Html Email to Plain Text

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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...
 
We should throw him a surprise party. It will cheer him up. We can use this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic