debug
parent
e5456f31e7
commit
4bc4952440
|
|
@ -1770,9 +1770,10 @@ class PHPMailer
|
|||
*/
|
||||
protected function smtpSend($header, $body)
|
||||
{
|
||||
try {
|
||||
$bad_rcpt = [];
|
||||
if (!$this->smtpConnect($this->SMTPOptions)) {
|
||||
throw new \Exception($this->lang('smtp_connect_failed'), self::STOP_CRITICAL);
|
||||
throw new Exception($this->lang('smtp_connect_failed'), self::STOP_CRITICAL);
|
||||
}
|
||||
//Sender already validated in preSend()
|
||||
if ('' == $this->Sender) {
|
||||
|
|
@ -1841,6 +1842,12 @@ class PHPMailer
|
|||
}
|
||||
|
||||
return true;
|
||||
} catch (Exception $exc) {
|
||||
$lastexception = $exc;
|
||||
$this->edebug($exc->getMessage());
|
||||
// We must have connected, but then failed TLS or Auth, so close connection nicely
|
||||
$this->smtp->quit();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue