PHPMailer\PHPMailer

PHPMailer::smtpClose()publicWP 1.0

Close the active SMTP session if one exists.

Method of the class: PHPMailer{}

No Hooks.

Return

null. Nothing (null).

Usage

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

PHPMailer::smtpClose() code WP 6.5.2

public function smtpClose()
{
    if ((null !== $this->smtp) && $this->smtp->connected()) {
        $this->smtp->quit();
        $this->smtp->close();
    }
}