diff options
Diffstat (limited to 'core/Mail.php')
-rw-r--r-- | core/Mail.php | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/core/Mail.php b/core/Mail.php index 09a3936a36..ee3098dd92 100644 --- a/core/Mail.php +++ b/core/Mail.php @@ -8,6 +8,7 @@ */ namespace Piwik; +use Piwik\Plugins\CoreAdminHome\CustomLogo; use Zend_Mail; /** @@ -28,6 +29,17 @@ class Mail extends Zend_Mail { parent::__construct($charset); $this->initSmtpTransport(); + $this->setDefaultFrom(); + } + + private function setDefaultFrom() + { + $customLogo = new CustomLogo(); + $fromEmailName = $customLogo->isEnabled() + ? Piwik::translate('CoreHome_WebAnalyticsReports') + : Piwik::translate('ScheduledReports_PiwikReports'); + $fromEmailAddress = Config::getInstance()->General['noreply_email_address']; + $this->setFrom($fromEmailAddress, $fromEmailName); } /** |