Posted By:
Tek_Tang
Posted On:
Tuesday, July 24, 2001 07:40 PM
How do you resolve null NullPointerException when trying to get mail content when using IMAP4?
I can retrieve mail subject, from, date received and size, but I can't retrieve the content. It works if I use POP3 protocol to get the content.
Here is the error message I get if I use IMAP4:
java.lang.NullPointerException
at
com.sun.mail.imap.IMAPMessage.getContentType(IMAPMessage.java:323)
at
javax.mail.internet.MimeBodyPart.isMimeType(MimeBodyPart.java:802)
at
javax.mail.internet.MimeMessage.isMimeType(MimeMessage.java:851)