Posted By:
Ron_R
Posted On:
Monday, September 10, 2001 12:24 PM
I've got the standard MimeMultiPart decode method (straight out of the example code from Sun) but I'm having problems reading certain e-mail messages. Every time I call getContent or getInputStream on what I know to be com.sun.mail.imap.IMAPBodyPart with a content type of TEXT/PLAIN, the method ends up throwing an IO Exception from deep in the JavaMail API. My stack dump looks like java.io.IOException: No content at com.sun.mail.imap.IMAPInputStream.fill at com.sun.mail.imap.IMAPInputStream.read at java.io.InputStreamReader.fill at java.io.InputStreamReader.read at com.sun.mail.handlers.text_plain.getContent at
More>>
I've got the standard MimeMultiPart decode method (straight out of the example code from Sun) but I'm having problems reading certain e-mail messages.
Every time I call
getContent
or
getInputStream
on what I know to be
com.sun.mail.imap.IMAPBodyPart
with a content type of TEXT/PLAIN, the method ends up throwing an IO Exception from deep in the JavaMail API.
My stack dump looks like
java.io.IOException: No content
at com.sun.mail.imap.IMAPInputStream.fill
at com.sun.mail.imap.IMAPInputStream.read
at java.io.InputStreamReader.fill
at java.io.InputStreamReader.read
at com.sun.mail.handlers.text_plain.getContent
at javax.activation.DataSourceDataContentHandler.getContent
at javax.activation.DataHandler.getContent
at javax.mail.internet.MimeBodyPart.getContent
I have no clue as to what causes this to happen, but I know that it is fairly easy for me to produce an e-mail that breaks JavaMail. Any suggestions? I'm really not looking forward to developing my own JavaMail.
Thanks!
<<Less