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-issuemaster opened this Issue Nov 27, 2018 · 1 comment

Comments

Projects
None yet
2 participants
@spring-issuemaster
Copy link
Collaborator

spring-issuemaster 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-issuemaster

This comment has been minimized.

Copy link
Collaborator

spring-issuemaster 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