aspose file tools*
The moose likes Other JSE/JEE APIs and the fly likes How to parse the content(mail body) of email using java mail API Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "How to parse the content(mail body) of email using java mail API" Watch "How to parse the content(mail body) of email using java mail API" New topic
Author

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

srikanth savannagari
Greenhorn

Joined: Mar 22, 2011
Posts: 15
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

Joined: Oct 27, 2005
Posts: 19670
    
  18

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


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
srikanth savannagari
Greenhorn

Joined: Mar 22, 2011
Posts: 15
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

Joined: Oct 27, 2005
Posts: 19670
    
  18

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

Joined: Mar 22, 2011
Posts: 15
Yeh Rob,

i am unable to handle <select> in reply
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19670
    
  18

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
Marshal

Joined: Mar 22, 2005
Posts: 41525
    
  53
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.


Ping & DNS - my free Android networking tools app
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to parse the content(mail body) of email using java mail API