Getting javax.mail.internet.ParseException when parsing MIME message
Hi All,
The MIME Content Type is as below.
Content-Type: application/pdf;
name="ecm-000669.pdf";
Content-Disposition: attachment;
filename="ecm-000669.pdf";
When executing the following statement
ContentType ct = new ContentType(contentType);
where contentType is application/pdf;
name="ecm-000669.pdf";
Getting the below error
javax.mail.internet.ParseException
at javax.mail.internet.ParameterList.<init>(ParameterList.java:61)
at javax.mail.internet.ContentType.<init>(ContentType.java:83)
at oracle.apps.fnd.wf.common.MIMEUtils.handleContent(MIMEUtils.java:488)
at oracle.apps.fnd.wf.mailer.EmailParser.processSingleContent(EmailParser.java:1851)
at oracle.apps.fnd.wf.mailer.EmailParser.parseBody(EmailParser.java:2166)
at oracle.apps.fnd.wf.mailer.EmailParser.parseEmail(EmailParser.java:1195)
at oracle.apps.fnd.wf.mailer.IMAPResponseHandler.processSingleMessage(IMAPResponseHandler.java:255)
at oracle.apps.fnd.wf.mailer.IMAPResponseHandler.processMessage(IMAPResponseHandler.java:92)
at oracle.apps.fnd.cp.gsc.SvcComponentProcessor.process(SvcComponentProcessor.java:659)
at oracle.apps.fnd.cp.gsc.Processor.run(Processor.java:283)
at java.lang.Thread.run(Thread.java:534)
The error is not happening when I remove the semi colon at the end of content-type header as shown below
Content-Type: application/pdf;
name="ecm-000669.pdf"
Can you please tell that semi colon at the end of Content-Type header is not supported in MIME standard? This MIME is coming from the rediff email client. Is there any parameter in Java Mail API to avoid these kind of issues?