Skip to content

Commit

Permalink
fix: Use email_user variable as from name for emails if available (#8550
Browse files Browse the repository at this point in the history
)

* fix: Use email_user variable as from name for emails if available

* Update functions.php
  • Loading branch information
laf authored and murrant committed Apr 12, 2018
1 parent 041de7e commit 2ee4ea2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions includes/functions.php
Expand Up @@ -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) {
Expand Down

0 comments on commit 2ee4ea2

Please sign in to comment.