作者 邓超

x

@@ -20,6 +20,12 @@ class syncMail { @@ -20,6 +20,12 @@ class syncMail {
20 { 20 {
21 $db = db(); 21 $db = db();
22 22
  23 + if(empty($data['to_name'])){
  24 + $data['to_name'] = [];
  25 + }
  26 +
  27 + $data['to_name'] = is_array($data['to_name'])?$data['to_name']:json_decode($data['to_name']);
  28 +
23 // 是否在指定文件夹内 29 // 是否在指定文件夹内
24 $f = $db->value(folderSql::first($data['folder_id'],'folder')); 30 $f = $db->value(folderSql::first($data['folder_id'],'folder'));
25 $f = folderAlias($f); 31 $f = folderAlias($f);
@@ -37,7 +43,13 @@ class syncMail { @@ -37,7 +43,13 @@ class syncMail {
37 } 43 }
38 44
39 if(empty($is_hot)){ 45 if(empty($is_hot)){
40 - if($f == 's' && $db->count('select count(*) from `hot_mail` where `email` = "'.$data['from'].'"')){ 46 + if($f=='f'){
  47 + $w = ['email' => array_column($data['to_name'],'email')];
  48 + }else{
  49 + $w = ['email' =>$data['from']];
  50 + }
  51 +
  52 + if($db->count('select count(*) from `hot_mail` where '.dbWhere($w))){
41 $is_hot = 1; 53 $is_hot = 1;
42 } 54 }
43 } 55 }