-
Notifications
You must be signed in to change notification settings - Fork 85
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
should provide better error if no receiver can be parsed #62
Comments
I took a look at this and it's hard to fix without also addressing 😂😂 what I think is a design mistake in swallowing address exceptions during message creation. We could throw some other exception instead of an NPE, but "the message had address errors, sorry" isn't much more helpful than the NPE. What do people think about a breaking change to fix address handling? Worth fixing in 1.x, or wait for a 2.x? I'd like to modernize other parts of the code as well, so leaning toward a 2.x. I'll document other improvements I see as possibilities and if anyone wants to submit PRs, that would be great. 🙏 |
Works around a bug in postal where an invalid address doesn't raise exception drewr/postal#62.
Works around a bug in postal where an invalid address doesn't raise exception drewr/postal#62.
I'd be very happy with some sort of InvalidAddressException instead of an NPE. |
In smtp-send*, the return value of .getAllRecipients should be checked for null. Please refer to http://docs.oracle.com/javaee/5/api/javax/mail/Message.html#getAllRecipients()
Otherwise .sendMessage comes up with a weird null pointer exception if null is passed as addresses parameter, which happens if no receiver can be parsed.
The text was updated successfully, but these errors were encountered: