Skip to content

Commit

Permalink
Merge pull request #954 from paulhoadley/fix-npe-in-sendmail
Browse files Browse the repository at this point in the history
ERMailDelivery.sendMail() does not allow for null returned from Message.getAllRecipients()
  • Loading branch information
hugithordarson authored Jun 9, 2021
2 parents f76b455 + eddcbe9 commit d378d8f
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -599,7 +599,8 @@ public void sendMail(boolean shouldBlock) {
mimeMessage().setRecipients(Message.RecipientType.CC, new InternetAddress[0]);
mimeMessage().setRecipients(Message.RecipientType.BCC, new InternetAddress[0]);
}
if (mimeMessage().getAllRecipients().length == 0) {
if (mimeMessage().getAllRecipients() == null || mimeMessage().getAllRecipients().length == 0) {
log.debug("No recipients, not sending.");
return;
}

Expand Down

0 comments on commit d378d8f

Please sign in to comment.