|
@@ -297,7 +297,8 @@ class MailFun { |
|
@@ -297,7 +297,8 @@ class MailFun { |
297
|
* @author:dc
|
297
|
* @author:dc
|
298
|
* @time 2024/3/6 9:21
|
298
|
* @time 2024/3/6 9:21
|
299
|
*/
|
299
|
*/
|
300
|
- public static function getHostPort($host,$port=0){
|
300
|
+ public static function getHostPort($host,$port=0,$ssl = 'ssl://'){
|
|
|
301
|
+ $host = ltrim($host,'/');
|
301
|
$arr = explode(":",$host);
|
302
|
$arr = explode(":",$host);
|
302
|
if(str_contains($host, '//')){
|
303
|
if(str_contains($host, '//')){
|
303
|
return [
|
304
|
return [
|
|
@@ -307,7 +308,7 @@ class MailFun { |
|
@@ -307,7 +308,7 @@ class MailFun { |
307
|
}else{
|
308
|
}else{
|
308
|
|
309
|
|
309
|
return [
|
310
|
return [
|
310
|
- 'host' => $arr[0],
|
311
|
+ 'host' => $ssl.$arr[0],
|
311
|
'port' => empty($arr[1]) ? $port : $arr[1],
|
312
|
'port' => empty($arr[1]) ? $port : $arr[1],
|
312
|
];
|
313
|
];
|
313
|
}
|
314
|
}
|