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


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
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: 19541
    
  16

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: 19541
    
  16

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: 19541
    
  16

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: 39547
    
  27
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 - updated with new look and Ping home screen widget
 
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
 
Similar Threads
can somebody suggest me how to parse the content of the email using java mail api
Parse data from a db column.
Not Getting content in html format from Lotus domino server when open mail message in my portlet jsp
How to set Multilanguage Subject in Javax.mail
How to uudecode