Skip to:
Content

BuddyPress.org

Changeset 11387


Ignore:
Timestamp:
01/18/2017 10:27:47 AM (3 years ago)
Author:
djpaul
Message:

Emails: add filter to change PHPMailer object used to deliver emails.

Fixes #7286

Props dcavins

File:
1 edited

Legend:

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

    r10702 r11387  
    2828        static $phpmailer = null;
    2929
    30         if ( $phpmailer === null ) {
     30        /**
     31         * Filter PHPMailer object to use.
     32         *
     33         * Specify an alternative version of PHPMailer to use instead of WordPress' default.
     34         *
     35         * @since 2.8.0
     36         *
     37         * @param null|PHPMailer $phpmailer The phpmailer class.
     38         */
     39        $phpmailer = apply_filters( 'bp_phpmailer_object', $phpmailer );
     40
     41        if ( ! ( $phpmailer instanceof PHPMailer ) ) {
    3142            if ( ! class_exists( 'PHPMailer' ) ) {
    3243                require_once ABSPATH . WPINC . '/class-phpmailer.php';
Note: See TracChangeset for help on using the changeset viewer.