正在显示
3 个修改的文件
包含
22 行增加
和
11 行删除
cmd/readme.md
0 → 100644
controller/fob_ai/readme.md
0 → 100644
@@ -1035,17 +1035,17 @@ class Imap { | @@ -1035,17 +1035,17 @@ class Imap { | ||
1035 | // $isssl = in_array(parse_url($this->host)['host']??'1-1',['mail.laser-tech.com.cn']); | 1035 | // $isssl = in_array(parse_url($this->host)['host']??'1-1',['mail.laser-tech.com.cn']); |
1036 | 1036 | ||
1037 | // 链接服务器 | 1037 | // 链接服务器 |
1038 | - $this->socket = stream_socket_client($this->host, $errno, $error, $this->timeout,STREAM_CLIENT_CONNECT,stream_context_create([ | ||
1039 | - 'ssl' => [ | ||
1040 | - 'verify_peer' => false, // 有的证书和域名不匹配,这里关闭认证 | ||
1041 | - 'verify_peer_name' => false,// 有的证书和域名不匹配,这里关闭认证 | ||
1042 | -// 'capture_peer_cert' => true, | ||
1043 | -// 'capture_peer_cert_chain' => true, | ||
1044 | -// 'SNI_enabled' => true, | ||
1045 | -// 'SNI_server_name' => 'mail.laser-tech.com.cn' | ||
1046 | -// 'allow_self_signed' => false | ||
1047 | - ] | ||
1048 | - ])); | 1038 | + try { |
1039 | + $this->socket = stream_socket_client($this->host, $errno, $error, $this->timeout,STREAM_CLIENT_CONNECT,stream_context_create([ | ||
1040 | + 'ssl' => [ | ||
1041 | + 'verify_peer' => false, // 有的证书和域名不匹配,这里关闭认证 | ||
1042 | + 'verify_peer_name' => false,// 有的证书和域名不匹配,这里关闭认证 | ||
1043 | + ] | ||
1044 | + ])); | ||
1045 | + }catch (\Throwable $e){ | ||
1046 | + $this->socket = stream_socket_client($this->host, $errno, $error, $this->timeout); | ||
1047 | + } | ||
1048 | + | ||
1049 | 1049 | ||
1050 | if($error){ | 1050 | if($error){ |
1051 | throw new \Exception("socket error: {$error}"); | 1051 | throw new \Exception("socket error: {$error}"); |
-
请 注册 或 登录 后发表评论