作者 邓超

1

... ... @@ -261,18 +261,18 @@ function sync(){
try {
if(empty($folder['_child'])){
// 同步父文件夹
$mailServer->syncMail($id,$folder['id'],$folder['origin_name']);
$mailServer->syncMail($id,$folder['id'],$folder['origin_folder']);
}else{
foreach ($folder as $item){
// 同步子文件夹
$mailServer->syncMail($id,$item['id'],$folder['origin_name'].'/'.$item['origin_name']);
$mailServer->syncMail($id,$item['id'],$folder['origin_folder'].'/'.$item['origin_folder']);
}
}
}catch (Throwable $e){
logs(
$e->getMessage(),
LOG_PATH.'/imap/'.$email.'.error.log'
LOG_PATH.'/imap/'.$email['email'].'.error.log'
);
}
}
... ...
... ... @@ -21,7 +21,7 @@ class folderSql {
* @time 2023/2/18 9:22
*/
public static function all(int $email_id):string {
return "select `folder`,`pid`,`origin_folder`,`last_sync_time` from `".static::$table."` where `email_id` = {$email_id} order by `id` asc";
return "select `folder`,`pid`,`origin_folder`,`last_sync_time`,`folder` from `".static::$table."` where `email_id` = {$email_id} order by `id` asc";
}
... ...