$mail = new phpmailer; $mail->issmtp();        $mail->host = 'smtp.163.com';   $mail->smtpauth = true;$mail->charset='utf-8';     $mail->username = 'xxxx@163.com';  $mail->password = 'xxx';   $mail->port = 25;   $mail->from = 'xxxx@163.com';            $mail->fromname = 'xxxx';     $mail->addaddress('xxx@qq.com');      $mail->wordwrap = 50;                              $mail->ishtml(true);                     $mail->subject = '发送邮件测试';$mail->body    = 'xxxx';if(!$mail->send()) {    echo '邮件发送失败.';    echo '错误信息: ' . $mail->errorinfo;} else {    echo '邮件发送成功';}
回复内容:                                                                                  $mail = new phpmailer; $mail->issmtp();        $mail->host = 'smtp.163.com';   $mail->smtpauth = true;$mail->charset='utf-8';     $mail->username = 'xxxx@163.com';  $mail->password = 'xxx';   $mail->port = 25;   $mail->from = 'xxxx@163.com';            $mail->fromname = 'xxxx';     $mail->addaddress('xxx@qq.com');      $mail->wordwrap = 50;                              $mail->ishtml(true);                     $mail->subject = '发送邮件测试';$mail->body    = 'xxxx';if(!$mail->send()) {    echo '邮件发送失败.';    echo '错误信息: ' . $mail->errorinfo;} else {    echo '邮件发送成功';}
https://github.com/kokororin/posutoba/tree/master/src/system/library/vendor/phpmailer
vendor('phpmailer.phpmailerautoload');$mail = new \phpmailer();
用thinkphp框架的吧,把smtp那个类文件的命名空间改为和你的phpmailer类一样的命名空间就好了,前几天刚刚配置过
   
 
   