diff --git a/wire/core/WireMail.php b/wire/core/WireMail.php index 320d1a1a..5c672122 100644 --- a/wire/core/WireMail.php +++ b/wire/core/WireMail.php @@ -629,10 +629,13 @@ class WireMail extends WireData implements WireMailInterface { */ protected function renderMailHeader() { + $settings = $this->wire()->config->wireMail; $from = $this->from; + + if(!strlen($from) && !empty($settings['from'])) $from = $settings['from']; if(!strlen($from)) $from = $this->wire('config')->adminEmail; if(!strlen($from)) $from = 'processwire@' . $this->wire('config')->httpHost; - + $header = "From: " . ($this->fromName ? $this->bundleEmailAndName($from, $this->fromName) : $from); foreach($this->header as $key => $value) { diff --git a/wire/modules/Process/ProcessForgotPassword/ProcessForgotPassword.module b/wire/modules/Process/ProcessForgotPassword/ProcessForgotPassword.module index 207b3d18..dd1a28c1 100644 --- a/wire/modules/Process/ProcessForgotPassword/ProcessForgotPassword.module +++ b/wire/modules/Process/ProcessForgotPassword/ProcessForgotPassword.module @@ -939,6 +939,10 @@ class ProcessForgotPassword extends Process implements ConfigurableModule { */ protected function getEmailFrom() { $emailFrom = $this->emailFrom; + if(empty($emailFrom)) { + $settings = $this->wire()->config->wireMail; + if(!empty($settings['from'])) $emailFrom = $settings['from']; + } if(empty($emailFrom)) $emailFrom = $this->wire('config')->adminEmail; if(empty($emailFrom)) $emailFrom = 'noreply@' . $this->wire('config')->httpHost; return $emailFrom;