...
|
...
|
@@ -297,12 +297,21 @@ class MailFun { |
|
|
* @author:dc
|
|
|
* @time 2024/3/6 9:21
|
|
|
*/
|
|
|
public static function getHostPort($host,$port = 465){
|
|
|
list($h,$p) = explode(":",$host.':'.$port);
|
|
|
public static function getHostPort($host,$port=0){
|
|
|
$arr = explode(":",$host);
|
|
|
if(str_contains($host, '//')){
|
|
|
return [
|
|
|
'host' => $h,
|
|
|
'port' => $p,
|
|
|
'host' => $arr[0].':'.$arr[1],
|
|
|
'port' => empty($arr[2]) ? $port : $arr[2],
|
|
|
];
|
|
|
}else{
|
|
|
|
|
|
return [
|
|
|
'host' => $arr[0],
|
|
|
'port' => empty($arr[1]) ? $port : $arr[1],
|
|
|
];
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
...
|
...
|
|