您的当前位置:首页正文

linux 下 用phpmailer类smtp发送邮件始终不成功 报错信息:SMTP connect() failed.

来源:画鸵萌宠网

如果在使用PHPMailer类发送邮件的时候,在windows系统测试正常,但是部署到linux服务器上就发送失败,并且报错:SMTP connect() failed.

原因是:

1 该linux服务器上allow_url_fopen 值为off

查看 disable_functions = ..........后有fsockopen函数

解决:

1 allow_url_fopen = On

2 去掉disable_function = 中的fsockopen函数名

转载于:https://www.cnblogs.com/Zell-Dinch/articles/4155199.html

因篇幅问题不能全部显示,请点此查看更多更全内容

Top