diff options
author | Kate Butler <kate@innocraft.com> | 2019-10-11 01:20:09 +0300 |
---|---|---|
committer | Thomas Steur <tsteur@users.noreply.github.com> | 2019-10-11 01:20:09 +0300 |
commit | da92367838fa85b806dfd2486b6e91c308cb5e46 (patch) | |
tree | b680b8311c69ea8d9dad409c8fcd1f1f410b5486 /core/Mail.php | |
parent | 2956209a7af53cfad8231a1f0625a19bb20decf1 (diff) |
Allow noreply email address/from to be set in admin panel (#14975)
Diffstat (limited to 'core/Mail.php')
-rw-r--r-- | core/Mail.php | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/core/Mail.php b/core/Mail.php index 64295c526e..ddc2299445 100644 --- a/core/Mail.php +++ b/core/Mail.php @@ -147,11 +147,7 @@ class Mail extends Zend_Mail return parent::setSubject($subject); } - /** - * @param string $email - * @return string - */ - protected function parseDomainPlaceholderAsPiwikHostName($email) + public function getMailHost() { $hostname = Config::getInstance()->mail['defaultHostnameIfEmpty']; $piwikHost = Url::getCurrentHost($hostname); @@ -162,7 +158,16 @@ class Mail extends Zend_Mail if ($this->isHostDefinedAndNotLocal($url)) { $piwikHost = $url['host']; } + return $piwikHost; + } + /** + * @param string $email + * @return string + */ + protected function parseDomainPlaceholderAsPiwikHostName($email) + { + $piwikHost = $this->getMailHost(); return str_replace('{DOMAIN}', $piwikHost, $email); } |