作者 邓超

1

... ... @@ -273,6 +273,10 @@ class Home extends Base {
$this->setFlags('seen');
}
public function answered_2_unanswered(){
$this->setFlags('answered');
}
/**
... ... @@ -401,6 +405,11 @@ class Home extends Base {
$mailInstance->seen(array_column($uid,'uid'),$folder['origin_folder'],$fv);
break;
}
// 未回复/已回复
case 'answered':{
$mailInstance->answered(array_column($uid,'uid'),$folder['origin_folder'],$fv);
break;
}
// 回收站,已删 未删,软删
// case 'deleted':{
// $mailInstance->recycle(array_column($uid,'uid'),$folder['origin_folder'],$fv);
... ...
... ... @@ -402,6 +402,24 @@ class Mail {
}
/**
* 回复标记
* @param $uids
* @param $folder
* @param $seen
* @return bool
* @throws \Exception
* @author:dc
* @time 2023/4/6 17:10
*/
public function answered($uids,$folder,$seen):bool{
// 选择目录
$status = $this->client->selectFolder($folder);
return $this->client->flags($uids,[Imap::FLAGS_ANSWERED],$seen ? '+' : '-',true);
}
/**
* 复制
* @param $uids
* @param $folder
... ...
... ... @@ -33,6 +33,8 @@ return [
'sync' => [\Controller\Home::class, 'sync'],
// 标记为已读
'seen_2_unseen' => [\Controller\Home::class, 'seen_2_unseen'],
// 标记为已回复/未回复
'answered_2_unanswered' => [\Controller\Home::class, 'seen_2_unseen'],
// 邮件移动文件夹
'move' => [\Controller\Home::class, 'move'],
// 检查邮箱状态
... ...