...
|
...
|
@@ -105,7 +105,10 @@ class SyncMail { |
|
|
* @time 2024/9/12 15:29
|
|
|
*/
|
|
|
private function auto_mail($id,$data){
|
|
|
$filter = '2 Automatic reply
|
|
|
|
|
|
$filter = redis()->get('ai_email_filter_lists',[]);
|
|
|
if(!$filter || !is_array($filter)){
|
|
|
$filter = '2 Automatic reply
|
|
|
2 Delivery
|
|
|
2 Automatische Antwort
|
|
|
2 Undeliverable
|
...
|
...
|
@@ -133,14 +136,22 @@ class SyncMail { |
|
|
2 Automatyczna
|
|
|
2 代开
|
|
|
2 expired';
|
|
|
$filter = explode("\n",$filter);
|
|
|
$filter = explode("\n",$filter);
|
|
|
$filter = array_map(function ($v){
|
|
|
list($t,$str) = [
|
|
|
intval(mb_substr($v,0,1)),
|
|
|
trim(mb_substr($v,1,99)),
|
|
|
];
|
|
|
return [$t,$str];
|
|
|
},$filter);
|
|
|
}
|
|
|
|
|
|
foreach ($filter as $f){
|
|
|
if(!$f) continue;
|
|
|
list($t,$str) = [
|
|
|
intval(mb_substr($f,0,1)),
|
|
|
trim(mb_substr($f,1,99)),
|
|
|
];
|
|
|
|
|
|
$t = $f[0]??''; // 类型
|
|
|
$str = $f[1]??''; // 值
|
|
|
if(!$str) continue;
|
|
|
|
|
|
$haystack = '';
|
|
|
if($t==2){
|
|
|
$haystack = $data['subject'];
|
...
|
...
|
@@ -148,9 +159,9 @@ class SyncMail { |
|
|
$haystack = $data['from'];
|
|
|
}
|
|
|
if(stripos($haystack,$str)!==false){
|
|
|
if(!$this->db->count("select count(*) from `lists_auto` where `list_id` = ".$id)){
|
|
|
try {
|
|
|
$this->db->create('lists_auto',['list_id'=>$id],false);
|
|
|
}
|
|
|
}catch (\Throwable $e){}
|
|
|
break;
|
|
|
}
|
|
|
}
|
...
|
...
|
|