瀏覽代碼

Update:去掉echo输出内容

Jinhui Zhu 5 年之前
父節點
當前提交
bf45d5c45e
共有 1 個文件被更改,包括 2 次插入5 次删除
  1. 2 5
      src/Library/Third/phpmailer/class.phpmailer.php

+ 2 - 5
src/Library/Third/phpmailer/class.phpmailer.php

@@ -451,7 +451,8 @@ class PHPMailer {
    */
   private function AddAnAddress($kind, $address, $name = '') {
     if (!preg_match('/^(to|cc|bcc|ReplyTo)$/', $kind)) {
-      echo 'Invalid recipient array: ' . kind;
+
+      $this->SetError('Invalid recipient array: ' . $kind);
       return false;
     }
     $address = trim($address);
@@ -461,7 +462,6 @@ class PHPMailer {
       if ($this->exceptions) {
         throw new phpmailerException($this->Lang('invalid_address').': '.$address);
       }
-      echo $this->Lang('invalid_address').': '.$address;
       return false;
     }
     if ($kind != 'ReplyTo') {
@@ -493,7 +493,6 @@ class PHPMailer {
       if ($this->exceptions) {
         throw new phpmailerException($this->Lang('invalid_address').': '.$address);
       }
-      echo $this->Lang('invalid_address').': '.$address;
       return false;
     }
     $this->From = $address;
@@ -583,7 +582,6 @@ class PHPMailer {
       if ($this->exceptions) {
         throw $e;
       }
-      echo $e->getMessage()."\n";
       return false;
     }
   }
@@ -1367,7 +1365,6 @@ class PHPMailer {
       if ($this->exceptions) {
         throw $e;
       }
-      echo $e->getMessage()."\n";
       if ( $e->getCode() == self::STOP_CRITICAL ) {
         return false;
       }