This content has been marked as final. Show 3 replies
See the package javadocs for the javax.mail.internet package for all the properties you can set to control things like this.
In particular, the System property mail.mime.parameters.strict can be set to false to better handle incorrectly formatted
And of course when you discover such an incorrectly formatted message, you should always report the bug to the owner
of the software that created the message.
To determine what needs to be quoted where and how, you need to read the detailed syntax requirements in the specs.
Guessing the rules by inference or analogy doesn't work.
Hi bshannon ,
Thanks for your reply.
I set the system property "mail.mime.parameters.strict" to false as below in our code.
But still I see the same error "javax.mail.internet.ParseException: Expected ';', got "/""
I tried to log the System property 'mail.mime.parameters.strict' before setting to false as below
But this was returning null, but this should return true by default, which means that property not exists.
Can you let me know in which java Mail API this property is introduced.
I tried even with latest 1.4.4 API, still the same issue.
You have to be sure to set the System property before the JavaMail classes that use it are loaded.
If you're running in an application server, for instance, you may need to set it when the application
server starts up, not when your application starts.
The property was introduced in JavaMail 1.4.2.
You can test the use of this property by saving the message to a file and using the msgshow.java
demo program to read the file. Set the property on the command line when running the program.
If that still doesn't work, send me a copy of the message that isn't parsed correctly at email@example.com.