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.

Method of the class: PHPMailer{}

No Hooks.

Return

SMTP.

Usage

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

PHPMailer::getSMTPInstance() code WP 6.5.2

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

    return $this->smtp;
}