JavaMail: Null pointer exeception in BODYSTRUCTURE.parseParameters. Is it a bug?
I finally discovered the cause of the problem.
I'm including Apache Cxf in my project.
Cxf includes a reference to geronimo-javamail_1.4_spec which overwrites some of the javamail classes.
Excluding the reference to geronimo, everything works correctly !
You've probably got a mix of JavaMail classes from two different versions of JavaMail. Check your classpath for other instances of the javax.mail.* classes, perhaps in a j2ee.jar or javaee.jar.