diff options
-rw-r--r-- | config/global.ini.php | 1 | ||||
-rw-r--r-- | core/Mail.php | 3 |
2 files changed, 3 insertions, 1 deletions
diff --git a/config/global.ini.php b/config/global.ini.php index 868159a93f..1a8e9da79d 100644 --- a/config/global.ini.php +++ b/config/global.ini.php @@ -295,6 +295,7 @@ ip_address_mask_length = 1 ;Segments[]="customVariableName1==VisitType;customVariableValue1==Customer" [mail] +defaultHostnameIfEmpty = piwik.org ; if hostname can't be read, defaults to @piwik.org when sending emails transport = ; smtp (using the configuration below) or empty (using built-in mail() function) port = ; optional; defaults to 25 when security is none or tls; 465 for ssl host = ; SMTP server address diff --git a/core/Mail.php b/core/Mail.php index 3b74504b14..93ce405fda 100644 --- a/core/Mail.php +++ b/core/Mail.php @@ -31,7 +31,8 @@ class Piwik_Mail extends Zend_Mail public function setFrom($email, $name = null) { - $piwikHost = Piwik_Url::getCurrentHost('piwik.org'); + $hostname = Zend_Registry::get('config')->mail->defaultHostnameIfEmpty; + $piwikHost = Piwik_Url::getCurrentHost($hostname); $email = str_replace('{DOMAIN}', $piwikHost, $email); parent::setFrom($email, $name); } |