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:
Neil Lathwood
2018-04-12 13:30:38 +01:00
committed by Tony Murray
parent 041de7e822
commit 2ee4ea2abc

View File

@@ -934,6 +934,9 @@ 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) {