From 11357f9507f94a269d82f66bd2345862987daf34 Mon Sep 17 00:00:00 2001 From: Jimmy Huang Date: Tue, 3 Sep 2024 19:21:24 +0800 Subject: [PATCH] refs #41524, correct the empty sender --- CRM/Mailing/BAO/Job.php | 2 +- CRM/Mailing/BAO/Transactional.php | 2 +- CRM/Utils/Mail.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CRM/Mailing/BAO/Job.php b/CRM/Mailing/BAO/Job.php index cfee0abc8..c34abba10 100644 --- a/CRM/Mailing/BAO/Job.php +++ b/CRM/Mailing/BAO/Job.php @@ -608,7 +608,7 @@ public function deliverGroup(&$fields, &$mailing, &$mailer, &$job_date, &$attach } // refs #30289, for valid DKIM - if (empty(CRM_Core_Config::singleton()->enableDMARC) && empty($headers['Sender']) && !empty($mailer->_mailSetting['return_path'])) { + if (empty($headers['Sender']) && !empty($mailer->_mailSetting['return_path'])) { $headers['Sender'] = $mailer->_mailSetting['return_path']; } diff --git a/CRM/Mailing/BAO/Transactional.php b/CRM/Mailing/BAO/Transactional.php index 0da182212..2fb986c18 100644 --- a/CRM/Mailing/BAO/Transactional.php +++ b/CRM/Mailing/BAO/Transactional.php @@ -180,7 +180,7 @@ public static function send(&$params, $callback = NULL) { CRM_Core_Error::ignoreException(); // refs #30289, for valid DKIM - if (empty(CRM_Core_Config::singleton()->enableDMARC) && empty($headers['Sender']) && !empty($mailer->_mailSetting['return_path'])) { + if (empty($headers['Sender']) && !empty($mailer->_mailSetting['return_path'])) { $headers['Sender'] = $mailer->_mailSetting['return_path']; } diff --git a/CRM/Utils/Mail.php b/CRM/Utils/Mail.php index 5830cda6b..60465516a 100644 --- a/CRM/Utils/Mail.php +++ b/CRM/Utils/Mail.php @@ -210,7 +210,7 @@ static function send(&$params, $callback = NULL) { CRM_Core_Error::ignoreException(); if (is_object($mailer)) { // refs #30289, for valid DKIM - if (empty(CRM_Core_Config::singleton()->enableDMARC) && empty($headers['Sender']) && !empty($mailer->_mailSetting['return_path'])) { + if (empty($headers['Sender']) && !empty($mailer->_mailSetting['return_path'])) { $headers['Sender'] = $mailer->_mailSetting['return_path']; $headers['Return-Path'] = $mailer->_mailSetting['return_path']; }