smtp : if there is an error with the server, send QUIT and close correctely the connection
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@3291 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
2
smtp.php
2
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;
|
||||
|
||||
Reference in New Issue
Block a user