Fix #2115 only set default Reply-To address if the user has not specified a Reply-To address

This commit is contained in:
Kijin Sung 2023-05-21 20:00:30 +09:00
parent 51a910a310
commit baf80a0d80

View file

@ -33,9 +33,10 @@ class Advanced_MailerController extends Advanced_Mailer
{ {
list($default_from, $default_name) = $this->getDefaultEmailIdentity(); list($default_from, $default_name) = $this->getDefaultEmailIdentity();
$mail->setFrom($default_from, $default_name); $mail->setFrom($default_from, $default_name);
if ($replyTo = config('mail.default_reply_to')) $default_reply_to = config('mail.default_reply_to');
if ($default_reply_to && !$mail->message->getReplyTo())
{ {
$mail->setReplyTo($replyTo); $mail->setReplyTo($default_reply_to);
} }
} }
elseif (toBool($config->force_sender ?? 'N')) elseif (toBool($config->force_sender ?? 'N'))