From 0e67e96621098bdc6cc49bd37c15b8b20eb6f6b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcus=20M=C3=BCller?= <25648755+M-arcus@users.noreply.github.com> Date: Thu, 28 Mar 2019 13:50:39 +0100 Subject: [PATCH] [FIX] Add Address for mailing --- phpmailer/phpmailer.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/phpmailer/phpmailer.php b/phpmailer/phpmailer.php index 89cbfb65..ee2343d2 100644 --- a/phpmailer/phpmailer.php +++ b/phpmailer/phpmailer.php @@ -62,12 +62,10 @@ function phpmailer_emailer_send_prepare(App $a, array &$b) $mail->Host = $a->config['system']['smtp_server']; $mail->Port = $a->config['system']['smtp_port']; - /* if (!empty($a->config['system']['smtp_secure']) && (bool)$a->config['system']['smtp_secure'] !== '') { $mail->SMTPSecure = $a->config['system']['smtp_secure']; $mail->Port = $a->config['system']['smtp_port_s']; } - */ if (!empty($a->config['system']['smtp_username']) && !empty($a->config['system']['smtp_password'])) { $mail->SMTPAuth = true; @@ -86,6 +84,10 @@ function phpmailer_emailer_send_prepare(App $a, array &$b) // add text $mail->AltBody = $b['textVersion']; + if (!empty($b['toEmail'])) { + $mail->addAddress($b['toEmail']); + } + // html version if (!empty($b['htmlVersion'])) { $mail->isHTML(true);