...
|
...
|
@@ -37,7 +37,19 @@ class MailFun { |
|
|
* @time 2023/3/27 13:55
|
|
|
*/
|
|
|
public static function mb_coding(string $str,array $appcode=[]){
|
|
|
return (new Header())->decode(trim($str," \t\n\r"));
|
|
|
$str = (new Header())->decode(trim($str," \t\n\r"));
|
|
|
// if(str_starts_with($str, '=?')){
|
|
|
// try {
|
|
|
// $encode = @mb_detect_encoding($str, array_merge(array("ASCII",'UTF-8',"GB2312","GBK",'BIG5'),$appcode));
|
|
|
// if($encode){
|
|
|
// return @mb_convert_encoding($str, 'UTF-8', $encode);
|
|
|
// }
|
|
|
// }catch (\Throwable $e){
|
|
|
//
|
|
|
// }
|
|
|
// }
|
|
|
|
|
|
return $str;
|
|
|
}
|
|
|
|
|
|
|
...
|
...
|
|