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.