bbottema / simple-java-mail

Simple API, Complex Emails (Jakarta Mail smtp wrapper)

Home Page:http://www.simplejavamail.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bug: when using dispositionNotificationTo or returnReceiptTo mode, when the corresponding emails are not filled, it fails even though it should fall back to replyTo or From

bbottema opened this issue · comments

Disposition-Notification-To and Return-Receipt-To can be turned on and optionally filled specifically with an address in Simple Java Mail. But when left empty, the Reply-To should be used if provided, or else even just the From address. Now it fails on the validation step, when sending emails.

This is solved in 8.0.0, when the defaults/overrides are applied when sending the email (or when forced to build with those using emailBuilder.buildApplyingDefaultsAndOverrides()).