mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
fix: Use email_user variable as from name for emails if available (#8550)
* fix: Use email_user variable as from name for emails if available * Update functions.php
This commit is contained in:
committed by
Tony Murray
parent
041de7e822
commit
2ee4ea2abc
@@ -934,6 +934,9 @@ function send_mail($emails, $subject, $message, $html = false)
|
|||||||
$mail->Hostname = php_uname('n');
|
$mail->Hostname = php_uname('n');
|
||||||
|
|
||||||
foreach (parse_email($config['email_from']) as $from => $from_name) {
|
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);
|
$mail->setFrom($from, $from_name);
|
||||||
}
|
}
|
||||||
foreach ($emails as $email => $email_name) {
|
foreach ($emails as $email => $email_name) {
|
||||||
|
|||||||
Reference in New Issue
Block a user