Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

javax.mail.internet.ParseException when trying to send a MIME message

843830Dec 1 2004 — edited Dec 1 2004
Hi,

I am using JavaMail to send a MIME message, but I am getting the following exception:

at java.lang.Throwable.fillInStackTrace(Native Method)
at java.lang.Throwable.fillInStackTrace(Compiled Code)
at java.lang.Throwable.<init>(Compiled Code)
at java.lang.Exception.<init>(Compiled Code)
at javax.mail.MessagingException.<init>(MessagingException.java:34)
at javax.mail.internet.ParseException.<init>(ParseException.java:27)
at javax.mail.internet.ParameterList.<init>(Compiled Code)
at javax.mail.internet.ContentType.<init>(ContentType.java:82)
at javax.mail.internet.MimeBodyPart.updateHeaders(MimeBodyPart.java:1051)
at javax.mail.internet.MimeMessage.updateHeaders(MimeMessage.java:1923)
at javax.mail.internet.MimeMessage.saveChanges(MimeMessage.java:1904)
at javax.mail.Transport.send(Transport.java:101)
at FPSend.main(Compiled Code)

The problem seems to be the header of the message, specifically the class-id filed of the content-type. This is the content-type header that causes javaMail to throw that exception:

Content-Type: multipart/alternative;
boundary="------------110059296832670";
class-id=11:9sc9bnYwM87box:2680047

I think the ":" character in the class-id is causing the problem. Does anybody know if those characters are valid according to MIME standards? And if they are not valid, is there a work around this problem?

thank you!
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 29 2004
Added on Dec 1 2004
2 comments
539 views