...
|
...
|
@@ -44,15 +44,8 @@ class Body { |
|
|
|
|
|
$this->fileSavePath = $fileSavePath;
|
|
|
|
|
|
// 这个是描述特殊文本
|
|
|
if(strpos($body,'This is a multi-part message in MIME format.')===0){
|
|
|
$body = trim($body,'This is a multi-part message in MIME format.');
|
|
|
$body = trim($body);
|
|
|
}
|
|
|
if(strpos($body,'This is a multipart message in MIME format.')===0){
|
|
|
$body = trim($body,'This is a multipart message in MIME format.');
|
|
|
$body = trim($body);
|
|
|
}
|
|
|
$body = $this->ltrimText($body);
|
|
|
|
|
|
|
|
|
// 163 有
|
|
|
if(strpos($body,'------=_Part')!==false){
|
...
|
...
|
@@ -106,6 +99,30 @@ class Body { |
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
public function ltrimText($body){
|
|
|
$bodyMiaoSuText = [
|
|
|
'This is a multi-part message in MIME format.',
|
|
|
'This is a multipart message in MIME format.',
|
|
|
'This is a MIME message. If you are reading this text, you may want to
|
|
|
consider changing to a mail reader or gateway that understands how to
|
|
|
properly handle MIME multipart messages.',
|
|
|
// 'This is a MIME message.'
|
|
|
];
|
|
|
|
|
|
foreach ($bodyMiaoSuText as $str){
|
|
|
// 这个是描述特殊文本
|
|
|
if(strpos($body,$str)===0){
|
|
|
$body = ltrim($body,$str);
|
|
|
$body = trim($body);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
return $body;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
/**
|
|
|
* 获取标签
|
|
|
* @param $body
|
...
|
...
|
|