diff --git a/phpmailer/phpmailer.php b/phpmailer/phpmailer.php index 89cbfb65..71392e1c 100644 --- a/phpmailer/phpmailer.php +++ b/phpmailer/phpmailer.php @@ -1,9 +1,4 @@ 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 +79,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);