PHPMailer\PHPMailer

SMTP::close()publicWP 1.0

Close the socket and clean up the state of the class. Don't use this function without first trying to use QUIT.

Method of the class: SMTP{}

No Hooks.

Return

null. Nothing (null).

Usage

$SMTP = new SMTP();
$SMTP->close();

Notes

  • See: quit()

SMTP::close() code WP 6.5.2

public function close()
{
    $this->server_caps = null;
    $this->helo_rply = null;
    if (is_resource($this->smtp_conn)) {
        //Close the connection and cleanup
        fclose($this->smtp_conn);
        $this->smtp_conn = null; //Makes for cleaner serialization
        $this->edebug('Connection: closed', self::DEBUG_CONNECTION);
    }
}