Skip to content

NullPointerException in Mailer.sendMail(Email) when the Mailer(Session) constructor is used #7

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
GoogleCodeExporter opened this issue Apr 17, 2015 · 3 comments

Comments

@GoogleCodeExporter
Copy link

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 [email protected] on 19 Sep 2012 at 6:10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants