From 5e1033f44002d0266753b668985f5cf764f9acde Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuli=20Sillanp=C3=A4=C3=A4?= <samuli.sillanpaa@gmail.com> Date: Fri, 25 Jan 2019 14:57:13 +0200 Subject: [PATCH] Fix multiple reply-to addresses in Feedback emails. (#1307) This fixes a bug where feedback email message is sent with multiple reply-to addresses when (1) sender email address was supplied via the feedback form and (2) override_from is configured in config.ini > Mail. --- module/VuFind/src/VuFind/Controller/FeedbackController.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/module/VuFind/src/VuFind/Controller/FeedbackController.php b/module/VuFind/src/VuFind/Controller/FeedbackController.php index dfe12cbdf8f..1e958550845 100644 --- a/module/VuFind/src/VuFind/Controller/FeedbackController.php +++ b/module/VuFind/src/VuFind/Controller/FeedbackController.php @@ -150,6 +150,9 @@ class FeedbackController extends AbstractBase ) { try { $mailer = $this->serviceLocator->get('VuFind\Mailer\Mailer'); + if ($replyToEmail) { + $mailer->setFromAddressOverride(''); + } $mailer->send( new Address($recipientEmail, $recipientName), new Address($senderEmail, $senderName), -- GitLab