利用PHPMailer发送邮件时报错

利用thinkphp集成PHPMailer发送邮件时报错:Failed to connect to server: Unable to find the socket transport “ssl” – did you forget to enable it when you configured PHP

解决办法:

1、既然是ssl错误,习惯性的从php.ini中相应行打开支持,(extension=php_openssl.dll),服务器是windows主机,重启iis发现竟然还是不支持?

2、然后,在php.ini中打开opensll扩展,并将php目录下的libeay32.dll和ssleay32.dll两个库拷贝到system32下

接下来重启环境。

原文地址:https://www.cnblogs.com/EasonJim/p/5485211.html