...
|
...
|
@@ -330,15 +330,8 @@ class Mail { |
|
|
foreach ($body as $key=>$item){
|
|
|
if(!$description && in_array($item['type']??'',['text/html','text/plain'])){
|
|
|
|
|
|
// 是否是base64
|
|
|
$value = @base64_decode($item['body']);
|
|
|
|
|
|
if(!$value){
|
|
|
$value = $item['body'];
|
|
|
}
|
|
|
|
|
|
if(!empty($item['charset'])){
|
|
|
$value = iconv($item['charset'],'utf-8',$value);
|
|
|
$value = iconv($item['charset'],'utf-8',$item['body']);
|
|
|
}
|
|
|
$value=preg_replace("/<(script.*?)>(.*?)<(\/script.*?)>/si","",$value); //过滤script标签
|
|
|
$value=preg_replace("/<(\/?script.*?)>/si","",$value); //过滤script标签
|
...
|
...
|
@@ -349,6 +342,7 @@ class Mail { |
|
|
$value = strip_tags($value);
|
|
|
$value = str_replace(["\n",' ',"\\n"," "],'',$value);
|
|
|
$description = mb_substr(trim($value),0,190);
|
|
|
|
|
|
}
|
|
|
|
|
|
if(!empty($body[$key]['body'])){
|
...
|
...
|
|