diff --git a/wire/core/WireMail.php b/wire/core/WireMail.php index 20e78e3f..61a31113 100644 --- a/wire/core/WireMail.php +++ b/wire/core/WireMail.php @@ -634,12 +634,14 @@ class WireMail extends WireData implements WireMailInterface { $config = $this->wire()->config; $settings = $config->wireMail; $from = $this->from; + $fromName = $this->fromName; if(!strlen($from) && !empty($settings['from'])) $from = $settings['from']; if(!strlen($from)) $from = $config->adminEmail; if(!strlen($from)) $from = 'processwire@' . $config->httpHost; + if(!strlen($fromName) && !empty($settings['fromName'])) $fromName = $settings['fromName']; - $header = "From: " . ($this->fromName ? $this->bundleEmailAndName($from, $this->fromName) : $from); + $header = "From: " . ($fromName ? $this->bundleEmailAndName($from, $fromName) : $from); foreach($this->header as $key => $value) { $header .= "\r\n$key: $value";