作者 邓超

x

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