Skip to content

Commit

Permalink
#450: don't invalidate email if dispositionNotificationTo should be u…
Browse files Browse the repository at this point in the history
…sed but the email for it was left empty. Idem for returnReceiptTo. Instead, allow fall-back to replyTo or From (which is already in place, but would never trigger because of the validation step)
  • Loading branch information
bbottema committed Mar 7, 2023
1 parent 8eeb03b commit 3b6a786
Showing 1 changed file with 0 additions and 4 deletions.
Expand Up @@ -100,10 +100,6 @@ public static void validateCompleteness(final @NotNull EmailWithDefaultsAndOverr
throw new MailCompletenessException(MailCompletenessException.MISSING_RECIPIENT);
} else if (email.getFromRecipient() == null) {
throw new MailCompletenessException(MailCompletenessException.MISSING_SENDER);
} else if (TRUE.equals(email.getUseDispositionNotificationTo()) && email.getDispositionNotificationTo() == null) {
throw new MailCompletenessException(MailCompletenessException.MISSING_DISPOSITIONNOTIFICATIONTO);
} else if (TRUE.equals(email.getUseReturnReceiptTo()) && email.getReturnReceiptTo() == null) {
throw new MailCompletenessException(MailCompletenessException.MISSING_RETURNRECEIPTTO);
}
}

Expand Down

0 comments on commit 3b6a786

Please sign in to comment.