作者 邓超

x

@@ -42,6 +42,9 @@ class AutoMail { @@ -42,6 +42,9 @@ class AutoMail {
42 $this->black_emails = $this->db->all("select * from `ai_black_email`"); 42 $this->black_emails = $this->db->all("select * from `ai_black_email`");
43 $this->black_emails = array_column($this->black_emails,'email'); 43 $this->black_emails = array_column($this->black_emails,'email');
44 44
  45 + $this->black_emails = array_map("strtolower",$this->black_emails);
  46 +
  47 +
45 if(redis()->add('black_mail_sync2',1,60)){ 48 if(redis()->add('black_mail_sync2',1,60)){
46 echo '正在计算数据'; 49 echo '正在计算数据';
47 $maxId = $this->db->value("select `id` from `lists` order by `id` desc limit 1"); 50 $maxId = $this->db->value("select `id` from `lists` order by `id` desc limit 1");
@@ -84,7 +87,7 @@ class AutoMail { @@ -84,7 +87,7 @@ class AutoMail {
84 // 必须是收件箱 87 // 必须是收件箱
85 if(in_array($item['folder_id'],$this->fids)){ 88 if(in_array($item['folder_id'],$this->fids)){
86 // 是否在黑名单中 89 // 是否在黑名单中
87 - if(in_array($item['from'],$this->black_emails)){ 90 + if(in_array(strtolower($item['from']),$this->black_emails)){
88 if (!isset($this->filter[$item['email_id']])){ 91 if (!isset($this->filter[$item['email_id']])){
89 // 找到邮箱 92 // 找到邮箱
90 $e = $this->db->value(listsSql::first(dbWhere(['id'=>$item['email_id']]),'email')); 93 $e = $this->db->value(listsSql::first(dbWhere(['id'=>$item['email_id']]),'email'));