作者 邓超

1

... ... @@ -260,7 +260,7 @@ function sync($email_id,$worker_id){
}
}
}catch (Throwable $e){
}catch (\Throwable $e){
logs(
$e->getMessage().$e->getTraceAsString(),
LOG_PATH.'/imap/'.$email['email'].'.error.log'
... ...
... ... @@ -232,7 +232,7 @@ class Mail {
'from_name' => $header['From'][0]['name']??'',
'to' => $header['To']?implode(',',array_column($header['To'],'email')):'',
'to_name' => json_encode($header['To']),
'date' => isset($header['Date'])&&$header['Date'] ? strtotime(is_array($header['Date']) ? $header['Date'][0] : $header['Date']) : strtotime($result['INTERNALDATE']),
'date' => strtotime(is_array($header['Date']??'') ? $header['Date'][0] : $header['Date']??''),
'message_id' => $header['Message-ID']??'',
'udate' => strtotime($result['INTERNALDATE']),
'size' => $result['RFC822.SIZE']??0,
... ... @@ -246,6 +246,7 @@ class Mail {
'uuid' => md5($email_id.$folder_id.$result['UID']),
'is_file' => MailFun::isFile($result['BODYSTRUCTURE']??'') //是否附件
];
$data['date'] = $data['date'] ? : 0;
}catch (\Throwable $e){
logs(
'邮件解析失败:'.PHP_EOL.$e->getMessage().PHP_EOL.print_r($result,true),
... ...