作者 邓超

预热 逻辑

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