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
Assignees
Labels
status: backported type: bug
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

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 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.

@spring-projects-issues spring-projects-issues added type: bug status: backported labels Jan 11, 2019
@spring-projects-issues spring-projects-issues added this to the 5.1.4 milestone Jan 11, 2019
This was referenced Jan 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: backported type: bug
Projects
None yet
Development

No branches or pull requests

2 participants