Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKate Butler <kate@innocraft.com>2019-10-11 01:20:09 +0300
committerThomas Steur <tsteur@users.noreply.github.com>2019-10-11 01:20:09 +0300
commitda92367838fa85b806dfd2486b6e91c308cb5e46 (patch)
treeb680b8311c69ea8d9dad409c8fcd1f1f410b5486 /core/Mail.php
parent2956209a7af53cfad8231a1f0625a19bb20decf1 (diff)
Allow noreply email address/from to be set in admin panel (#14975)
Diffstat (limited to 'core/Mail.php')
-rw-r--r--core/Mail.php15
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);
}