| 
...
 | 
...
 | 
@@ -103,7 +103,17 @@ class Body { | 
| 
 | 
 | 
             /***************** start 第一行处理 **************/
 | 
| 
 | 
 | 
             // 第一行 UID 1568602721 RFC822.TEXT {589}
 | 
| 
 | 
 | 
             $first = explode(' ',$body[0]);
 | 
| 
 | 
 | 
             while (1){ if(str_starts_with(array_shift($first), 'RFC822.')) break; }
 | 
| 
 | 
 | 
             $rfc822 = true;
 | 
| 
 | 
 | 
             while (1){
 | 
| 
 | 
 | 
                 $tempstr = array_shift($first);
 | 
| 
 | 
 | 
                 if(str_starts_with($tempstr, 'RFC822')) {
 | 
| 
 | 
 | 
                     // 是否是text 还是全部的包含header
 | 
| 
 | 
 | 
                     if(str_contains($tempstr, '.')){
 | 
| 
 | 
 | 
                         $rfc822 = false;
 | 
| 
 | 
 | 
                     }
 | 
| 
 | 
 | 
                     break;
 | 
| 
 | 
 | 
                 }
 | 
| 
 | 
 | 
             }
 | 
| 
 | 
 | 
             $first = array_values($first);
 | 
| 
 | 
 | 
             $first[0] = preg_replace("/^\{\d+\}/",'',$first[0]);
 | 
| 
 | 
 | 
             // 第一行的结果就是 踢出 UID 1568602721 RFC822.TEXT {589}
 | 
| 
...
 | 
...
 | 
@@ -119,6 +129,11 @@ class Body { | 
| 
 | 
 | 
 
 | 
| 
 | 
 | 
             // 再次组装成字符串
 | 
| 
 | 
 | 
             $data->body = trim(implode("\r\n",$body));
 | 
| 
 | 
 | 
             // 是否包含header
 | 
| 
 | 
 | 
             if($rfc822){
 | 
| 
 | 
 | 
                 // 删除header头信息这个是多余的
 | 
| 
 | 
 | 
                 $data->body = explode("\r\n\r\n",$data->body,2)[1];
 | 
| 
 | 
 | 
             }
 | 
| 
 | 
 | 
 
 | 
| 
 | 
 | 
             $this->items[] = $this->bodyDeCode($data);
 | 
| 
 | 
 | 
 
 | 
...
 | 
...
 | 
 |