作者 邓超

x

... ... @@ -56,6 +56,8 @@ class syncMail {
// 不是预热邮箱
if($f=='收件箱'){
$this->auto_mail($id,$data);
// 邮件过滤 这些邮箱都是系统邮箱
if(!$this->checkEmail($data['from']) && !$this->checkSubject($data['subject'])){
// 通知黑格 2024-08-22 新上 这个是异步的不会阻塞当前进程
... ... @@ -144,4 +146,47 @@ class syncMail {
}
private function auto_mail($id,$data){
$filter = [
['2','Automatic reply'],
['2','Delivery'],
['2','Automatische Antwort:'],
['2','Automatic_reply'],
['2','Undeliverable'],
['2','Failure'],
['2','Undelivered'],
['1','noreply'],
['1','postmaster'],
['1','email-notifications'],
['1','mailer-daemon'],
['1','no-reply'],
['2','自动回复'],
['2','Returned mail'],
['2','Autosvar'],
['2','Out Of Office Re'],
['2','Change_of_email_address'],
['2','delivered']
];
foreach ($filter as $f){
list($t,$str) = $f;
$haystack = '';
if($t==2){
$haystack = $data['subject'];
}elseif ($t==1){
$haystack = $data['from'];
}
if(stripos($haystack,$str)!==false){
if(!$this->db->count("select count(*) from `lists_auto` where `list_id` = ".$id)){
echo "插入数据 ".$id.'==>'.$this->db->create('lists_auto',['list_id'=>$id],false).'==>'.$haystack."\n";
}
break;
}
}
}
}
\ No newline at end of file
... ...