diff options
author | Thomas Steur <thomas.steur@gmail.com> | 2015-07-29 11:48:32 +0300 |
---|---|---|
committer | Thomas Steur <thomas.steur@gmail.com> | 2015-07-29 11:48:32 +0300 |
commit | c5fab31c28b602b9dfcbd40fbf8ac1aab249681c (patch) | |
tree | d10f2bc4afa267a5f9ac9f833ac0db888ddf0944 | |
parent | 08fa53b99fa94ad51112288487c6bcb950474dfa (diff) |
refs #8252 introduce new option noreply_email_name
-rw-r--r-- | config/global.ini.php | 3 | ||||
-rw-r--r-- | core/Mail.php | 6 |
2 files changed, 7 insertions, 2 deletions
diff --git a/config/global.ini.php b/config/global.ini.php index 0c0c736e37..673af0adb2 100644 --- a/config/global.ini.php +++ b/config/global.ini.php @@ -360,6 +360,9 @@ language_cookie_name = piwik_lang ; standard email address displayed when sending emails noreply_email_address = "noreply@{DOMAIN}" +; standard email name of the sender. If not set, a default will be used. +noreply_email_name = "" + ; feedback email address; ; when testing, use your own email address or "nobody" feedback_email_address = "feedback@piwik.org" diff --git a/core/Mail.php b/core/Mail.php index b44e01c341..22843b5a76 100644 --- a/core/Mail.php +++ b/core/Mail.php @@ -40,9 +40,11 @@ class Mail extends Zend_Mail /** @var Translator $translator */ $translator = StaticContainer::get('Piwik\Translation\Translator'); - if ($customLogo->isEnabled()) { + $fromEmailName = Config::getInstance()->General['noreply_email_name']; + + if (empty($fromEmailName) && $customLogo->isEnabled()) { $fromEmailName = $translator->translate('CoreHome_WebAnalyticsReports'); - } else { + } elseif (empty($fromEmailName)) { $fromEmailName = $translator->translate('ScheduledReports_PiwikReports'); } |