javamail----Transport.send====null
javamail 代码报
空指针异常在Transport.send(mailMessage);这一行说nullpointerException……
报的这个错好蛋疼,无从考究啊,求大神!
DEBUG: setDebug: JavaMail version 1.4.5
java.lang.NullPointerException at javax.mail.internet.MimeUtility.getEncoding(MimeUtility.java:226)
at javax.mail.internet.MimeUtility.getEncoding(MimeUtility.java:299)
at javax.mail.internet.MimeBodyPart.updateHeaders(MimeBodyPart.java:1375)
at javax.mail.internet.MimeBodyPart.updateHeaders(MimeBodyPart.java:1021)
at javax.mail.internet.MimeMultipart.updateHeaders(MimeMultipart.java:419)
at javax.mail.internet.MimeBodyPart.updateHeaders(MimeBodyPart.java:1354)
at javax.mail.internet.MimeMessage.updateHeaders(MimeMessage.java:2107)
at javax.mail.internet.MimeMessage.saveChanges(MimeMessage.java:2075)
at javax.mail.Transport.send(Transport.java:123)
at com.winy.mail.accomplish.AccomplishMailSender.sendMail(AccomplishMailSender.java:165)
at com.winy.mail.accomplish.TestAccomplishMail.main(TestAccomplishMail.java:27)
------解决方案--------------------
明显是mailMessage为null咯