Skip to content
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

Spring JavaMailSenderImpl does not show proper message when recipient list is empty [SPR-17540] #22072

Closed
spring-projects-issues opened this issue Nov 27, 2018 · 1 comment

Comments

@spring-projects-issues
Copy link
Collaborator

@spring-projects-issues spring-projects-issues commented Nov 27, 2018

Jebil opened SPR-17540 and commented

org.springframework.mail.javamail.JavaMailSenderImpl does not show proper message when recipient list is empty.

Currently it just throws NPE, which is hard to debug for beginners.


Referenced from: pull request #2029, and commits 16e9b83, 2efac5a, 191a2d3

Backported to: 5.0.12, 4.3.22

@spring-projects-issues
Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Dec 3, 2018

Juergen Hoeller commented

I've addressed this slightly differently, passing an empty Address array into sendMessage if we received null there and triggering the regular SendFailedException (with a "no recipient addresses" message) from the mail provider that way.

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

Successfully merging a pull request may close this issue.

None yet
2 participants