发送错误提示:
SMTP Error: Could not connect to SMTP host. Mailer Error (9475@qq.com) SMTP Error: Could not connect to SMTP host.
本地测试正常 上传到服务器上就出错了
当我把类中的函数
public function IsSMTP()
{
$this->Mailer = 'smtp'; //改成 $this->Mailer = 'SMTP'; 就可以发送 但是发送的邮件标题重复 并且被当做垃圾邮件处理
}
怎么解决 ??
CSDN 有没有老鸟...
更改phpmailer 的 class.stmp.php文件:
$this->smtp_conn = @fsockopen( $host, // the host of the server
$port, // the port to use
$errno, // error number if any
$errstr, // error message if any
$tval); // give up after ? secs
改为
$this->smtp_conn = @stream_socket_client( $host.':'.$port, // the host of the server
$errno, // error number if any
$errstr, // error message if any
$tval); // give up after ? secs
貌似楼上的没用啊
每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号