PHPMailer发送邮件失败:SMTP connect failed
2017-05-27 17:28
926 查看
版权声明:本文为博主原创文章,未经博主允许不得转载。
最近在写一个通过发送邮件重置密码的功能,在本地调试的好好的,结果上传到服务器上就报错,提示:SMTP connect failed,查了好几天原因,也试了网上的各种方法,终未果,最后实在没办法,问了一下大神,大神经过专业的排查后,终于成功解决问题。本人赶快整理一下,以备后用。
错误提示:SMTP connect failed(服务器环境Apache+PHP+MySQL)
错误分析:本人是在ThinkPHP框架上使用PHPMailer来发送邮件的,然后在本地可以发送邮件,上传的服务器上就不行了,从本地可以,服务器上报错这一行为其实可以基本断定应该是服务器配置文件有问题。
解决方法:找到php.ini文件并打开,将extension=php_openssl.dll这个句代码前的“;”去掉就OK了。
相关文章推荐
- PHPMailer发送邮件失败:SMTP connect failed
- PHPMailer发送邮件失败:SMTP connect failed
- phpmailer 生产环境发送邮件发送失败Failed to connect to server的解决办法
- PHP Mailer邮件发送失败发送失败! Mailer Error: SMTP connect() failed.
- PHPMailer发送邮件,出现无法连接host (Could not connect to SMTP host)
- 不能发送邮件 php+smtp失败:The following From address failed
- PHPMAILER_FROM_FAILED 发送(SMTP)邮件出现
- phpmailer邮件发送 错误 :SMTP Error: Could not authenticate.
- 腾讯企业邮箱SMTP-邮件发送失败异常:“ SMTPSendFailedException:501 ϵͳÒÑÇ¿ÖÆ¿ªÆôÕʺÅÉý¼¶ÉèÖã¬ÇëµÇ¼e
- lamp 环境 下,PHPmailer 发送失败The following From address failed: 的原因
- phpmailer发送邮件出现错误:stream_socket_enable_crypto(): SSL operation failed with code 1.
- linux 下 用phpmailer类smtp发送邮件始终不成功,提示:ERROR: Failed to co
- php smtp phpmailer发送邮件乱码
- linux phpmailer发送邮件失败
- PHPMailer通过Gmail和Office365的SMTP账号发送邮件设置
- phpmailer,smtp发送邮件实例(转)
- phpmailer发邮件提示SMTP->ERROR: Failed to connect to server的解决方法
- PHPMailer邮件类利用smtp.163.com发送邮件方法
- phpmailer发送邮件 SMTP Error: Could not authenticate 错误
- PHPMailer邮件类利用smtp.163.com发送邮件方法