• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to parse the content(mail body) of email using java mail API

 
srikanth savannagari
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

According to my requirement i have to parse the content(mail body) and subject of the mail, i am able to parse the subject of the mail
can anybody help to get out from this probelm.








Regards
Srikanth
 
Rob Spoor
Sheriff
Pie
Posts: 20609
63
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check out my second post in this old thread.

I have learned a few things after that though:
- text files can also be included as Strings, not just as InputStreams
- a Multipart with MIME type "multipart/alternative" is used for a body that has both a plain text and an HTML part
 
srikanth savannagari
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a lot Rob,

I have one more doubt about sending an html mail

I am able to send an html email containing drop down at the receiving end the user able to see the dropdown

My probelm is when ever user is trying to reply at that time the html drop down is visible as plain text, how can i
eradicate that problem



Thanks in Advance


Regards
Srikant
 
Rob Spoor
Sheriff
Pie
Posts: 20609
63
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Wait, you actually sent a <select> in an email?

Anyway, it may be a problem with the user's client that may simply a) be unable to handle the <select> in the reply, or b) is configured to reply in plain text only.
 
srikanth savannagari
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yeh Rob,

i am unable to handle <select> in reply
 
Rob Spoor
Sheriff
Pie
Posts: 20609
63
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My Outlook won't even display a <select> element. My first guess seems to be right - the client doesn't support it fully.
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Email is the wrong medium for HTML forms - that's what web servers (or servlet containers) are for.

Furthermore -as a bit of advice- never send emails that only contain HTML: there are just too many clients that don't support it, and users that sufficiently dislike it to turn HTML support off in their clients.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic