From 290c2448e52baa9d5c328bf2b076766573e436fb Mon Sep 17 00:00:00 2001
Message-Id: <290c2448e52baa9d5c328bf2b076766573e436fb.1460507400.git.inventive.mind@yahoo.com>
From: Ayush <inventive.mind@yahoo.com>
Date: Wed, 13 Apr 2016 05:59:47 +0530
Subject: [PATCH] Hostname remove
Removing hostname as after 2.5.0 we have added phpmailer_init hook and
wordpress is adding hostname using that hook
---
src/bp-core/classes/class-bp-phpmailer.php | 21 ---------------------
1 file changed, 21 deletions(-)
diff --git a/src/bp-core/classes/class-bp-phpmailer.php b/src/bp-core/classes/class-bp-phpmailer.php
index 2042103..70a4ebc 100644
|
a
|
b
|
class BP_PHPMailer implements BP_Email_Delivery { |
| 54 | 54 | |
| 55 | 55 | $phpmailer->IsMail(); |
| 56 | 56 | $phpmailer->CharSet = bp_get_option( 'blog_charset' ); |
| 57 | | $phpmailer->Hostname = self::get_hostname(); |
| 58 | | |
| 59 | 57 | |
| 60 | 58 | /* |
| 61 | 59 | * Content. |
| … |
… |
class BP_PHPMailer implements BP_Email_Delivery { |
| 134 | 132 | } |
| 135 | 133 | } |
| 136 | 134 | |
| 137 | | |
| 138 | | /* |
| 139 | | * Utility/helper functions. |
| 140 | | */ |
| 141 | | |
| 142 | | /** |
| 143 | | * Get an appropriate hostname for the email. Varies depending on site configuration. |
| 144 | | * |
| 145 | | * @since 2.5.0 |
| 146 | | * |
| 147 | | * @return string |
| 148 | | */ |
| 149 | | public static function get_hostname() { |
| 150 | | if ( is_multisite() ) { |
| 151 | | return get_current_site()->domain; // From fix_phpmailer_messageid() |
| 152 | | } |
| 153 | | |
| 154 | | return preg_replace( '#^https?://#i', '', bp_get_option( 'home' ) ); |
| 155 | | } |
| 156 | 135 | } |