Corrupt mail-header problem
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Stefan_Ritter
Posted On:   Tuesday, April 17, 2001 01:48 AM

I got regular e-mails from a mailing-list with the following mail-header: Content-type: text-plain; When calling MimeMessage.getContent() I get a NullPointerException, because of the semi-colon. A semi-colon means a charset should follow the content-type, for example something like: Content-type: text-plain; charset=usascii Here is the exception: java.lang.NullPointerException at sun.io.Converters.getConverterClass(Converters.java:78) at sun.io.Converters.newConverter(Converters.java:124) at sun.io.ByteToCharConverter.getConverter(ByteToCharConverter.java:67) at java.io.InputStreamReader. (I   More>>

I got regular e-mails from a mailing-list with the following mail-header:


Content-type: text-plain;


When calling MimeMessage.getContent() I get a NullPointerException, because of the semi-colon. A semi-colon means a charset should follow the content-type, for example something like:


Content-type: text-plain; charset=usascii


Here is the exception:



java.lang.NullPointerException
at
sun.io.Converters.getConverterClass(Converters.java:78)
at
sun.io.Converters.newConverter(Converters.java:124)
at
sun.io.ByteToCharConverter.getConverter(ByteToCharConverter.java:67)
at
java.io.InputStreamReader. (InputStreamReader.java:78)
at
com.sun.mail.handlers.text_plain.getContent(text_plain.java:65)
at
javax.activation.DataSourceDataContentHandler.getContent(DataHandler.java:755)
at
>javax.activation.DataHandler.getContent(DataHandler.java:511)
at
javax.mail.internet.MimeMessage.getContent(MimeMessage.java:1259)


Any suggestions how I can solve this issue?

   <<Less

Re: Corrupt mail-header problem

Posted By:   John_Zukowski  
Posted On:   Friday, April 20, 2001 08:07 PM

Contact the mailing list and tell them to fix the header....
About | Sitemap | Contact