|
@@ -330,15 +330,8 @@ class Mail { |
|
@@ -330,15 +330,8 @@ class Mail { |
330
|
foreach ($body as $key=>$item){
|
330
|
foreach ($body as $key=>$item){
|
331
|
if(!$description && in_array($item['type']??'',['text/html','text/plain'])){
|
331
|
if(!$description && in_array($item['type']??'',['text/html','text/plain'])){
|
332
|
|
332
|
|
333
|
- // 是否是base64
|
|
|
334
|
- $value = @base64_decode($item['body']);
|
|
|
335
|
-
|
|
|
336
|
- if(!$value){
|
|
|
337
|
- $value = $item['body'];
|
|
|
338
|
- }
|
|
|
339
|
-
|
|
|
340
|
if(!empty($item['charset'])){
|
333
|
if(!empty($item['charset'])){
|
341
|
- $value = iconv($item['charset'],'utf-8',$value);
|
334
|
+ $value = iconv($item['charset'],'utf-8',$item['body']);
|
342
|
}
|
335
|
}
|
343
|
$value=preg_replace("/<(script.*?)>(.*?)<(\/script.*?)>/si","",$value); //过滤script标签
|
336
|
$value=preg_replace("/<(script.*?)>(.*?)<(\/script.*?)>/si","",$value); //过滤script标签
|
344
|
$value=preg_replace("/<(\/?script.*?)>/si","",$value); //过滤script标签
|
337
|
$value=preg_replace("/<(\/?script.*?)>/si","",$value); //过滤script标签
|
|
@@ -349,6 +342,7 @@ class Mail { |
|
@@ -349,6 +342,7 @@ class Mail { |
349
|
$value = strip_tags($value);
|
342
|
$value = strip_tags($value);
|
350
|
$value = str_replace(["\n",' ',"\\n"," "],'',$value);
|
343
|
$value = str_replace(["\n",' ',"\\n"," "],'',$value);
|
351
|
$description = mb_substr(trim($value),0,190);
|
344
|
$description = mb_substr(trim($value),0,190);
|
|
|
345
|
+
|
352
|
}
|
346
|
}
|
353
|
|
347
|
|
354
|
if(!empty($body[$key]['body'])){
|
348
|
if(!empty($body[$key]['body'])){
|