From 98b59ceb6e3f1c31f1a2ff452d5bdbac7e7f3af9 Mon Sep 17 00:00:00 2001 From: devil_gong Date: Fri, 11 Jan 2019 18:23:12 +0800 Subject: [PATCH] debug --- extend/phpmailer/Exception.php | 39 ++++++++++++++++++++++++++++++++++ extend/phpmailer/PHPMailer.php | 7 ------ 2 files changed, 39 insertions(+), 7 deletions(-) create mode 100644 extend/phpmailer/Exception.php diff --git a/extend/phpmailer/Exception.php b/extend/phpmailer/Exception.php new file mode 100644 index 000000000..9a05dec3c --- /dev/null +++ b/extend/phpmailer/Exception.php @@ -0,0 +1,39 @@ + + * @author Jim Jagielski (jimjag) + * @author Andy Prevost (codeworxtech) + * @author Brent R. Matzelle (original founder) + * @copyright 2012 - 2017 Marcus Bointon + * @copyright 2010 - 2012 Jim Jagielski + * @copyright 2004 - 2009 Andy Prevost + * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License + * @note This program is distributed in the hope that it will be useful - WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. + */ + +namespace PHPMailer\PHPMailer; + +/** + * PHPMailer exception handler. + * + * @author Marcus Bointon + */ +class Exception extends \Exception +{ + /** + * Prettify error message output. + * + * @return string + */ + public function errorMessage() + { + return '' . htmlspecialchars($this->getMessage()) . "
\n"; + } +} diff --git a/extend/phpmailer/PHPMailer.php b/extend/phpmailer/PHPMailer.php index accf9ac52..1246c94f5 100644 --- a/extend/phpmailer/PHPMailer.php +++ b/extend/phpmailer/PHPMailer.php @@ -1770,7 +1770,6 @@ 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); @@ -1842,12 +1841,6 @@ 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(); - } } /**