|
...
|
...
|
@@ -138,6 +138,17 @@ class fob_ai_mail_auto_reply { |
|
|
|
// 配置
|
|
|
|
$replySetting = $this->getAutoReplySetting($postid,$email['email']);
|
|
|
|
if($replySetting){
|
|
|
|
$isnext = true;
|
|
|
|
if($replySetting['reply_num']??0){
|
|
|
|
$nk = 'fobaimailautoreplynum:'.$postid.':'.md5($data['from']);
|
|
|
|
if(redis()->get($nk,0) > $replySetting['reply_num']){
|
|
|
|
$isnext = false;
|
|
|
|
}else{
|
|
|
|
redis()->incr($nk);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if($isnext){
|
|
|
|
// 有配置才回复
|
|
|
|
$ret = \Lib\Mail\MailFun::sendEmail([
|
|
|
|
'subject' => 'Re:'.$data['subject'],
|
|
...
|
...
|
@@ -146,6 +157,8 @@ class fob_ai_mail_auto_reply { |
|
|
|
],$email);
|
|
|
|
_echo('回复成功'.$data['id'].'==='.$postid);
|
|
|
|
$this->log([$data,$replySetting,$ret]); // 立即写入日志
|
|
|
|
}
|
|
|
|
|
|
|
|
}else{
|
|
|
|
_echo('没有找到配置'.$data['id'].'==='.$postid);
|
|
|
|
}
|
...
|
...
|
|