[FIX] Add Address for mailing

This commit is contained in:
Marcus Müller 2019-03-28 13:50:39 +01:00 committed by GitHub
parent da8277e681
commit 0e67e96621
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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);