Merge pull request #2773 from dotdash/dont_rset_on_connection_error
Don't try to issue RSET on connection errors
This commit is contained in:
commit
165f449f4b
|
|
@ -1671,7 +1671,7 @@ class PHPMailer
|
|||
return $this->mailSend($this->MIMEHeader, $this->MIMEBody);
|
||||
}
|
||||
} catch (Exception $exc) {
|
||||
if ($this->Mailer === 'smtp' && $this->SMTPKeepAlive == true) {
|
||||
if ($this->Mailer === 'smtp' && $this->SMTPKeepAlive == true && $this->smtp->connected()) {
|
||||
$this->smtp->reset();
|
||||
}
|
||||
$this->setError($exc->getMessage());
|
||||
|
|
|
|||
Loading…
Reference in New Issue