mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
alerts: Updated parse_email() to use email_user config value (#8706)
This commit is contained in:
committed by
Tony Murray
parent
ce52b55795
commit
475f60001c
@ -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) {
|
||||
|
Reference in New Issue
Block a user