From 7af71f56e74876be3198dc82c220a3f864284773 Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Mon, 10 Feb 2020 14:09:06 -0800 Subject: [PATCH] CRM_Admin_Form_Setting_Smtp - Use the same mailer as CRM_Utils_Mail When civicrm-core used patches to change the behavior of `Mail_mail` (etal), this was fine. The preceding commit removes the patches and uses a wrapper instead - so it's more important to get the same mailer as the regular CRM_Utils_Mail logic. --- CRM/Admin/Form/Setting/Smtp.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CRM/Admin/Form/Setting/Smtp.php b/CRM/Admin/Form/Setting/Smtp.php index 87d30761cf..a3590b3ca2 100644 --- a/CRM/Admin/Form/Setting/Smtp.php +++ b/CRM/Admin/Form/Setting/Smtp.php @@ -165,7 +165,7 @@ class CRM_Admin_Form_Setting_Smtp extends CRM_Admin_Form_Setting { 'Subject' => $subject, ]; - $mailer = Mail::factory($mailerName, $params); + $mailer = CRM_Utils_Mail::_createMailer($mailerName, $params); $errorScope = CRM_Core_TemporaryErrorScope::ignoreException(); $result = $mailer->send($toEmail, $headers, $message); -- 2.25.1