...
|
...
|
@@ -1031,7 +1031,17 @@ class Imap { |
|
|
if(!is_resource($this->socket)){
|
|
|
$this->timeout = $timeout ? : 30;
|
|
|
// 链接服务器
|
|
|
$this->socket = @stream_socket_client($this->host, $errno, $error, $this->timeout);
|
|
|
$this->socket = stream_socket_client($this->host, $errno, $error, $this->timeout,STREAM_CLIENT_CONNECT,stream_context_create([
|
|
|
'ssl' => [
|
|
|
'verify_peer' => false, // 有的证书和域名不匹配,这里关闭认证
|
|
|
'verify_peer_name' => false,// 有的证书和域名不匹配,这里关闭认证
|
|
|
// 'capture_peer_cert' => true,
|
|
|
// 'capture_peer_cert_chain' => true,
|
|
|
// 'SNI_enabled' => true,
|
|
|
// 'SNI_server_name' => 'mail.laser-tech.com.cn'
|
|
|
// 'allow_self_signed' => false
|
|
|
]
|
|
|
]));
|
|
|
|
|
|
if($error){
|
|
|
throw new \Exception("socket error: {$error}");
|
...
|
...
|
|