diff --git a/smtp.php b/smtp.php index af09740..c24b88a 100644 --- a/smtp.php +++ b/smtp.php @@ -225,6 +225,8 @@ class smtp if (substr ($line, 0, 1) !== "2" && substr ($line, 0, 1) !== "3") { $this->debug ("Can't send mail : server answer : $line\n"); + $this->putLine ("QUIT\r\n"); + fclose ($this->smtpStream); throw new \Exception ("Can't send mail : server answer : $line", 500); } return $content;