作者 邓超

ai邮件模糊过滤 postmaster

... ... @@ -50,7 +50,7 @@ class MailList extends Base {
private function from_not_in(){
$where['from.notin'] = [];
$where = [];
/**
* 不查询哪些发件人的邮件
*/
... ... @@ -67,16 +67,17 @@ class MailList extends Base {
return false;
});
if($form_not_in){
if(isset($where['from.notin'])){
$where['from.notin'] = array_merge($where['from.notin'],$form_not_in);
}else{
$where['from.notin'] = $form_not_in;
$where = array_merge($where,$form_not_in);
}
}
// 过滤掉
foreach ($where as $k=>$item){
if(stripos($item,'postmaster@') === 0){
unset($where[$k]);
}
}
return $where['from.notin'];
return $where;
}
/**
... ... @@ -147,6 +148,7 @@ class MailList extends Base {
$where['deleted'] = 0;
$where['from.notin'] = $this->from_not_in();
$where['_'] = "`from` not like 'postmaster@%%'";
if(!$where['from.notin']) unset($where['from.notin']);
$filed = '`id`,`uid`,`subject`,`from`,`from_name`,`flagged`,`seen`,`udate`,`folder_id`,`is_file`,`description`,`lists`.`email_id`,`to_name`';
... ... @@ -210,6 +212,7 @@ class MailList extends Base {
$where['lists|deleted'] = 0; //未删状态
// 屏蔽哪些邮件
$where['from.notin'] = $this->from_not_in();
$where['_'] = "`from` not like 'postmaster@%'";
if(!$where['from.notin']) unset($where['from.notin']);
// 发件箱
... ...