作者 邓超

预热 逻辑

@@ -117,14 +117,14 @@ class HotMail { @@ -117,14 +117,14 @@ class HotMail {
117 $isInsert = false; 117 $isInsert = false;
118 if($data['folder'] == 's'){ 118 if($data['folder'] == 's'){
119 // 收件箱 匹配 from 字段 119 // 收件箱 匹配 from 字段
120 - $isInsert = in_array($data['from'],$this->shopkHotEmail); 120 + $isInsert = in_array(strtolower($data['from']),$this->shopkHotEmail);
121 }else{ 121 }else{
122 // 发件箱 匹配 to_name字段 122 // 发件箱 匹配 to_name字段
123 $to_name = is_array($data['to_name']) ? $data['to_name'] : @json_decode($data['to_name'],1); 123 $to_name = is_array($data['to_name']) ? $data['to_name'] : @json_decode($data['to_name'],1);
124 if($to_name){ 124 if($to_name){
125 foreach ($to_name as $item){ 125 foreach ($to_name as $item){
126 // 找到了就退出去 126 // 找到了就退出去
127 - if(in_array($item['email'],$this->shopkHotEmail)){ 127 + if(in_array(strtolower($item['email']),$this->shopkHotEmail)){
128 $isInsert = true; 128 $isInsert = true;
129 break; 129 break;
130 } 130 }
@@ -161,7 +161,8 @@ class HotMail { @@ -161,7 +161,8 @@ class HotMail {
161 if($data){ 161 if($data){
162 $data = @json_decode($data,1); 162 $data = @json_decode($data,1);
163 if($data && isset($data['data']) && is_array($data['data'])){ 163 if($data && isset($data['data']) && is_array($data['data'])){
164 - return $data['data']; 164 + // 全部转小写
  165 + return array_map("strtolower",$data['data']);
165 } 166 }
166 } 167 }
167 logs('shopk 获取预热邮箱错误:'.print_r($data,1),'get_hot_oa_email.error.log')->write(); 168 logs('shopk 获取预热邮箱错误:'.print_r($data,1),'get_hot_oa_email.error.log')->write();