PHPMailer\PHPMailer\PHPMailer::smtpClose PHP Method

smtpClose() public method

Close the active SMTP session if one exists.
public smtpClose ( ) : void
return void
    public function smtpClose()
    {
        if (!is_null($this->smtp)) {
            if ($this->smtp->connected()) {
                $this->smtp->quit();
                $this->smtp->close();
            }
        }
    }