PHP MAILER警告:trim()期望参数1为字符串

时间:2017-05-10 20:49:10

标签: php phpmailer

我正在使用phpmailer发送邮件,这是发送邮件,但我一直收到此错误,任何帮助表示赞赏,

  

警告:trim()期望参数1为字符串,对象在   .......... / mail / class.phpmailer.php在线   773

     

警告:trim()期望参数1为字符串,对象在   .......... / mail / class.phpmailer.php在线   773

     

警告:trim()期望参数1为字符串,对象在   .......... / mail / class.phpmailer.php在线   773

这里是第771行向下

771     protected function addOrEnqueueAnAddress($kind, $address, $name)
772        {
773            $address = trim($address);
774            $name = trim(preg_replace('/[\r\n]+/', '', $name)); //Strip breaks and trim
775            if (($pos = strrpos($address, '@')) === false) {
776                // At-sign is misssing.
777                $error_message = $this->lang('invalid_address') . " (addAnAddress $kind): $address";
778                $this->setError($error_message);
779                $this->edebug($error_message);
780                if ($this->exceptions) {
781                    throw new phpmailerException($error_message);
782                }
783                return false;
784            }

0 个答案:

没有答案