PHPMailer\PHPMailer

PHPMailer::getSMTPInstance()publicWP 1.0

Get an instance to use for SMTP operations. Override this function to load your own SMTP implementation, or set one with setSMTPInstance.

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

Хуков нет.

Возвращает

SMTP.

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

$PHPMailer = new PHPMailer();
$PHPMailer->getSMTPInstance();

Код PHPMailer::getSMTPInstance() WP 6.1.1

public function getSMTPInstance()
{
    if (!is_object($this->smtp)) {
        $this->smtp = new SMTP();
    }

    return $this->smtp;
}