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函数名

posted @ 2014-12-10 13:04  Zell~Dincht  阅读(404)  评论(0编辑  收藏  举报