1.用FTP打开 /wp-include/class-smtp.php ,最好是下载下来,搜索一下,查找到如下的代码:
- $this->smtp_conn = @stream_socket_client(
- $host . ":" . $port,
- $errno,
- $errstr,
- $timeout,
- STREAM_CLIENT_CONNECT,
- $socket_context
- );
PHP5.6会默认开启SSL验证,所以需要
在php.ini中增加一行
1
|
openssl.cafile=/etc/pki/tls/certs/ca-bundle.crt
|
重启服务器使修改生效