作者 邓超

预热自动回复

@@ -116,6 +116,9 @@ class fob_hot_ai_mail_auto_reply { @@ -116,6 +116,9 @@ class fob_hot_ai_mail_auto_reply {
116 if($this->db->cache(3600)->value(\Model\folderSql::has(['id'=>$data['folder_id'],'origin_folder'=>'INBOX']))){ 116 if($this->db->cache(3600)->value(\Model\folderSql::has(['id'=>$data['folder_id'],'origin_folder'=>'INBOX']))){
117 _echo('处理 '.$data['id']); 117 _echo('处理 '.$data['id']);
118 $email = $this->db->throw()->cache(3600)->first(\Model\emailSql::first($data['email_id'])); 118 $email = $this->db->throw()->cache(3600)->first(\Model\emailSql::first($data['email_id']));
  119 +
  120 + // 验证是否是ai邮箱
  121 + if($this->db->count(sprintf("select count(*) from `hot_mail` where `email` = '%s'",$email['email']))){
119 // 标记已读 122 // 标记已读
120 $mailInstance = \Lib\Imap\ImapPool::get((new \Lib\Imap\ImapConfig($email))); 123 $mailInstance = \Lib\Imap\ImapPool::get((new \Lib\Imap\ImapConfig($email)));
121 if($mailInstance->login()){ 124 if($mailInstance->login()){
@@ -138,7 +141,7 @@ class fob_hot_ai_mail_auto_reply { @@ -138,7 +141,7 @@ class fob_hot_ai_mail_auto_reply {
138 }else{ 141 }else{
139 _echo('来回超过5次就不回了 '.$data['id']); 142 _echo('来回超过5次就不回了 '.$data['id']);
140 } 143 }
141 - 144 + }
142 } 145 }
143 146
144 } 147 }