|
@@ -37,7 +37,19 @@ class MailFun { |
|
@@ -37,7 +37,19 @@ class MailFun { |
37
|
* @time 2023/3/27 13:55
|
37
|
* @time 2023/3/27 13:55
|
38
|
*/
|
38
|
*/
|
39
|
public static function mb_coding(string $str,array $appcode=[]){
|
39
|
public static function mb_coding(string $str,array $appcode=[]){
|
40
|
- return (new Header())->decode(trim($str," \t\n\r"));
|
40
|
+ $str = (new Header())->decode(trim($str," \t\n\r"));
|
|
|
41
|
+// if(str_starts_with($str, '=?')){
|
|
|
42
|
+// try {
|
|
|
43
|
+// $encode = @mb_detect_encoding($str, array_merge(array("ASCII",'UTF-8',"GB2312","GBK",'BIG5'),$appcode));
|
|
|
44
|
+// if($encode){
|
|
|
45
|
+// return @mb_convert_encoding($str, 'UTF-8', $encode);
|
|
|
46
|
+// }
|
|
|
47
|
+// }catch (\Throwable $e){
|
|
|
48
|
+//
|
|
|
49
|
+// }
|
|
|
50
|
+// }
|
|
|
51
|
+
|
|
|
52
|
+ return $str;
|
41
|
}
|
53
|
}
|
42
|
|
54
|
|
43
|
|
55
|
|