• 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

Mail body coming with HTML tags

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

I have a scenario of using java mail api as below:
I am reading Outlook/exchange server using java mail IMAP. The message bodies (including the cases which are of content type text/html) I am saving in local DB. But those contents are coming within <html> tags with all it's styles etc. These are nothing but the view source content of the mail bodies of outlook mails. I have to create one window for showing, replying the mails from my own application. So when I am showing those mail bodies within a text area from my jsp page, contents are showing with <html> tags, for that it's not possible to read the exact mail body contents. Also as there are features to reply or forward those mails, for that I need to provide text area support so that user can type further contents. Can anyone please suggest any idea how can I show only the mail bodies without html tags. Is there any option to provide html support for textarea contents? or I have to set specific content type at the type of mail reading from exchange server?
 
Ranch Hand
Posts: 32
Hibernate Spring Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi SoumyaGh,

Use the MimeBodyPart and use the Input stream and read the message and save where ever you need to save

For example


Thanks
 
reply
    Bookmark Topic Watch Topic
  • New Topic