feat/task1-c-wallet
devil_gong 2019-01-11 18:19:43 +08:00
parent e5456f31e7
commit 4bc4952440
1 changed files with 8 additions and 1 deletions

View File

@ -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();
}
}
/**