Skip to content

Commit 3b6a786

Browse files
committed
#450: don't invalidate email if dispositionNotificationTo should be used 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)
1 parent 8eeb03b commit 3b6a786

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

modules/simple-java-mail/src/main/java/org/simplejavamail/mailer/MailerHelper.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,10 +100,6 @@ public static void validateCompleteness(final @NotNull EmailWithDefaultsAndOverr
100100
throw new MailCompletenessException(MailCompletenessException.MISSING_RECIPIENT);
101101
} else if (email.getFromRecipient() == null) {
102102
throw new MailCompletenessException(MailCompletenessException.MISSING_SENDER);
103-
} else if (TRUE.equals(email.getUseDispositionNotificationTo()) && email.getDispositionNotificationTo() == null) {
104-
throw new MailCompletenessException(MailCompletenessException.MISSING_DISPOSITIONNOTIFICATIONTO);
105-
} else if (TRUE.equals(email.getUseReturnReceiptTo()) && email.getReturnReceiptTo() == null) {
106-
throw new MailCompletenessException(MailCompletenessException.MISSING_RETURNRECEIPTTO);
107103
}
108104
}
109105

0 commit comments

Comments
 (0)