Skip to content

Commit

Permalink
#167: fixed testing if there are email validation criteria
Browse files Browse the repository at this point in the history
  • Loading branch information
bbottema committed Oct 3, 2018
1 parent f374aae commit 58ea9ba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/org/simplejavamail/mailer/Mailer.java
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ public boolean validate(final Email email)
throw new MailerException(MailerException.MISSING_DISPOSITIONNOTIFICATIONTO);
} else if (email.isUseReturnReceiptTo() && email.getReturnReceiptTo() == null) {
throw new MailerException(MailerException.MISSING_RETURNRECEIPTTO);
} else if (emailAddressCriteria != null) {
} else if (!emailAddressCriteria.isEmpty()) {
if (!EmailAddressValidator.isValid(email.getFromRecipient().getAddress(), emailAddressCriteria)) {
throw new MailerException(format(MailerException.INVALID_SENDER, email));
}
Expand Down

0 comments on commit 58ea9ba

Please sign in to comment.