diff options
Diffstat (limited to 'Postman/Postman-Mail/PostmanDefaultModuleTransport.php')
-rw-r--r-- | Postman/Postman-Mail/PostmanDefaultModuleTransport.php | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/Postman/Postman-Mail/PostmanDefaultModuleTransport.php b/Postman/Postman-Mail/PostmanDefaultModuleTransport.php index 73c6777..8f30962 100644 --- a/Postman/Postman-Mail/PostmanDefaultModuleTransport.php +++ b/Postman/Postman-Mail/PostmanDefaultModuleTransport.php @@ -23,7 +23,7 @@ if (! class_exists ( 'PostmanSmtpModuleTransport' )) { parent::init(); // From email and name // If we don't have a name from the input headers - $this->fromName = 'WordPress'; + $this->fromName = apply_filters( 'wp_mail_from_name', 'WordPress' ); /* * If we don't have an email from the input headers default to wordpress@$sitename @@ -34,12 +34,10 @@ if (! class_exists ( 'PostmanSmtpModuleTransport' )) { */ // Get the site domain and get rid of www. - $sitename = strtolower ( $_SERVER ['SERVER_NAME'] ); - if (substr ( $sitename, 0, 4 ) == 'www.') { - $sitename = substr ( $sitename, 4 ); - } + $site_url = get_bloginfo( 'url' ); + $sitename = strtolower ( PostmanUtils::getHost( $site_url ) ); - $this->fromEmail = 'wordpress@' . $sitename; + $this->fromEmail = apply_filters( 'wp_mail_from', 'wordpress@' . $sitename ); } public function isConfiguredAndReady() { return false; |