作者 邓超

x

... ... @@ -737,9 +737,11 @@ class Imap {
$result = $this->fetch($data,'body',$is_uid);
foreach ($result as $key=>$item){
if (!empty($item['RFC822.TEXT'])){
$header = $this->fetchHeader([$item['UID']],1);
$header = $this->fetchHeader($item['UID'],1);
$header = array_values($header);
$header = $header[0]['HEADER.FIELDS']??[];
// 解析
$result[$key]['RFC822.TEXT'] = (new Body($item['RFC822.TEXT'],$saveFilePath,$header['HEADER.FIELDS']??[]))->getItem();
$result[$key]['RFC822.TEXT'] = (new Body($item['RFC822.TEXT'],$saveFilePath,$header))->getItem();
}
}
... ...