PHPMailer\PHPMailer
SMTP::quit
Send an SMTP QUIT command. Closes the socket if there is no error or the $close_on_error argument is true. Implements from RFC 821: QUIT <CRLF>.
Method of the class: SMTP{}
No Hooks.
Returns
true|false.
Usage
$SMTP = new SMTP(); $SMTP->quit( $close_on_error );
- $close_on_error(true|false)
- Should the connection close if an error occurs?.
Default:true
SMTP::quit() SMTP::quit code WP 7.0
public function quit($close_on_error = true)
{
$noerror = $this->sendCommand('QUIT', 'QUIT', 221);
$err = $this->error; //Save any error
if ($noerror || $close_on_error) {
$this->close();
$this->error = $err; //Restore any error from the quit command
}
return $noerror;
}