...
|
...
|
@@ -62,7 +62,7 @@ class syncMail { |
|
|
// mimecast@wsa.aero
|
|
|
$filterEmail = ['mimecast@wsa.aero'];
|
|
|
// 邮件过滤 这些邮箱都是系统邮箱
|
|
|
if(!in_array($data['from'],$filterEmail) && !preg_match("/^((no-?reply)|(postmaster)|(mailer-daemon)|(email-notifications)|(googleplay-noreply)|(postmaster-noreply))@/i",$data['from'])){
|
|
|
if(!in_array($data['from'],$filterEmail) && !preg_match("/^((no-?reply)|(postmaster)|(mailer-daemon)|(email-notifications)|(googleplay-noreply)|(postmaster-noreply))@/i",$data['from']) && !$this->checkSubject($data['subject'])){
|
|
|
// 通知黑格 2024-08-22 新上 这个是异步的不会阻塞当前进程
|
|
|
try {
|
|
|
SaberGM::post('https://fob.ai.cc/api/email_new_push',[
|
...
|
...
|
@@ -89,6 +89,27 @@ class syncMail { |
|
|
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 验证标题是否存在某些关键词
|
|
|
* @param string $subject
|
|
|
* @return bool
|
|
|
* @author:dc
|
|
|
* @time 2024/8/24 15:09
|
|
|
*/
|
|
|
public function checkSubject(string $subject){
|
|
|
|
|
|
$keys = [
|
|
|
'Automatic reply: ',
|
|
|
];
|
|
|
|
|
|
foreach ($keys as $key){
|
|
|
if(stripos($subject,$key)!==false){
|
|
|
return true;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
|
|
|
} |
|
|
\ No newline at end of file |
...
|
...
|
|