views:

297

answers:

2

I'm creating java MIMEMessage object from input stream. It is getting constructed properly without any problem.

I'm also able to fetch body and attachments. But the problem is, when I receive some emails with some different formating, like from iPhone or from Blackberry, my parsing fails.

I'm parsing Java MIMEMessage by myself.

Here I need a standard library which can parse Java MIMEMessage and provides me body and attachments.

Can anybody suggest me any library which can cater the unexpected email formats?

A: 

Is there a reason preventing you from using JavaMail (see the javax.mail.internet package)?

Damien B
+1  A: 

Another Java-Mail API is mime4j (http://james.apache.org/mime4j/index.html).

vesparun
Its not that Javax mail is not parsing email properly, it is doing that.But the way MimeMessage is constructed is the problem.So I need a component after these parsers, which can strip of email body and attachments.
sumitarora