alerts: Updated parse_email() to use email_user config value (#8706)

This commit is contained in:
Neil Lathwood
2018-05-14 19:56:43 +01:00
committed by Tony Murray
parent ce52b55795
commit 475f60001c

View File

@ -915,7 +915,8 @@ function parse_email($emails)
$result[$out[2][0]] = $out[1][0];
} else {
if (strpos($email, "@")) {
$result[$email] = null;
$from_name = Config::get('email_user');
$result[$email] = $from_name;
}
}
}
@ -934,9 +935,6 @@ function send_mail($emails, $subject, $message, $html = false)
$mail->Hostname = php_uname('n');
foreach (parse_email($config['email_from']) as $from => $from_name) {
if (empty($from_name)) {
$from_name = Config::get('email_user');
}
$mail->setFrom($from, $from_name);
}
foreach ($emails as $email => $email_name) {