NullPointerException in Mailer.sendMail(Email) when the Mailer(Session) constructor is used
GoogleCodeExporter opened this issue · 0 comments
GoogleCodeExporter commented
When calling
new org.codemonkey.simplejavamail.Mailer(mySession).sendMail(myEmail);
the following exception occurrs:
Exception in thread "main" java.lang.NullPointerException
at org.codemonkey.simplejavamail.Mailer.logSession(Mailer.java:260)
at org.codemonkey.simplejavamail.Mailer.sendMail(Mailer.java:238)
at MyClientCode
This is because Mailer.logSession(Session, TransportStrategy) tries to access
members of the TransportStrategy, which was never initialized by the
Mailer(Session) constructor.
Original issue reported on code.google.com by rodrigo....@gmail.com on 19 Sep 2012 at 6:10