錯誤信息:
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:
3.編輯 php.ini:vim php.ini
4.找到openssl.cafile配置項,修改為openssl.cafile=/usr/local/php/etc/cacert.pem
該路徑是步驟2下載的cacert.pem目錄