Skip to:
Content

BuddyPress.org

Changeset 10701


Ignore:
Timestamp:
04/13/2016 10:45:04 PM (9 years ago)
Author:
djpaul
Message:

Emails: don't set PHPMailer hostname property

Prior to 2.5.1, this was needed to support multisite. Now that we
support the phpmailer_init action, this isn't needed.

Removing it also fixes a problem where - on some servers - emails were
not being sent if non-multisite WordPress was running from a subfolder.

Fixes #7009 (2.5 branch)

Props singhleo

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.5/src/bp-core/classes/class-bp-phpmailer.php

    r10671 r10701  
    5454
    5555        $phpmailer->IsMail();
    56         $phpmailer->CharSet  = bp_get_option( 'blog_charset' );
    57         $phpmailer->Hostname = self::get_hostname();
     56        $phpmailer->CharSet = bp_get_option( 'blog_charset' );
    5857
    5958
     
    144143     *
    145144     * @since 2.5.0
     145     * @deprecated 2.5.3 No longer used.
    146146     *
    147147     * @return string
    148148     */
    149149    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' ) );
     150        return '';
    155151    }
    156152}
Note: See TracChangeset for help on using the changeset viewer.