PHPMailer\PHPMailer
DSNConfigurator::mailer
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() 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);
}