错误信息:

Swift_TransportException

Connection could not be established with host smtp.126.com :stream_socket_client(): SSL operation failed with code 1. OpenSSL Error messages: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed
 

错误原因:php openssl 没有加载 ca 证书 , 下载个 ca 证书 配置下php.ini 即可

解决步骤:

1.进入自己安装的php目录的

2.下载ca证书:wget http://curl.haxx.se/ca/cacert.pem 或者 直接下载:http://curl.haxx.se/ca/cacert.pem

3.编辑 php.ini:vim php.ini

4.找到openssl.cafile配置项,修改为openssl.cafile=/usr/local/php/etc/cacert.pem

   该路径是步骤2下载的cacert.pem目录

相关文章:

  • 2022-12-23
  • 2021-12-14
  • 2021-05-07
  • 2021-12-16
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 1970-01-01
  • 2021-12-04
  • 2021-12-27
  • 2021-06-01
  • 2021-11-08
相关资源
相似解决方案