PHPMailer\PHPMailer

DSNConfigurator::mailerpublic staticWP 1.0

Create new PHPMailer instance configured by DSN.

Метод класса: DSNConfigurator{}

Хуков нет.

Возвращает

PHPMailer.

Использование

$result = DSNConfigurator::mailer( $dsn, $exceptions );
$dsn(строка) (обязательный)
DSN.
$exceptions(true|false)
Should we throw external exceptions?.
По умолчанию: null

Код DSNConfigurator::mailer() WP 6.9

public static function mailer($dsn, $exceptions = null)
{
    static $configurator = null;

    if (null === $configurator) {
        $configurator = new DSNConfigurator();
    }

    return $configurator->configure(new PHPMailer($exceptions), $dsn);
}