正在显示
1 个修改的文件
包含
3 行增加
和
3 行删除
@@ -37,7 +37,7 @@ class HotMail { | @@ -37,7 +37,7 @@ class HotMail { | ||
37 | 37 | ||
38 | $this->shopkHotEmail = array_map('strtolower',$this->shopkHotEmail); | 38 | $this->shopkHotEmail = array_map('strtolower',$this->shopkHotEmail); |
39 | 39 | ||
40 | - $this->shopkHotEmail = array_unique($this->shopkHotEmail); | 40 | + $this->shopkHotEmail = array_flip($this->shopkHotEmail); |
41 | 41 | ||
42 | if($this->shopkHotEmail){ | 42 | if($this->shopkHotEmail){ |
43 | array_map([$this,'moveMail'],$fob); | 43 | array_map([$this,'moveMail'],$fob); |
@@ -131,14 +131,14 @@ class HotMail { | @@ -131,14 +131,14 @@ class HotMail { | ||
131 | $isInsert = false; | 131 | $isInsert = false; |
132 | if($data['folder'] != 'f'){ | 132 | if($data['folder'] != 'f'){ |
133 | // 收件箱 匹配 from 字段 | 133 | // 收件箱 匹配 from 字段 |
134 | - $isInsert = in_array(strtolower($data['from']),$this->shopkHotEmail); | 134 | + $isInsert = isset($this->shopkHotEmail[strtolower($data['from'])]); |
135 | }else{ | 135 | }else{ |
136 | // 发件箱 匹配 to_name字段 | 136 | // 发件箱 匹配 to_name字段 |
137 | $to_name = is_array($data['to_name']) ? $data['to_name'] : @json_decode($data['to_name'],1); | 137 | $to_name = is_array($data['to_name']) ? $data['to_name'] : @json_decode($data['to_name'],1); |
138 | if($to_name){ | 138 | if($to_name){ |
139 | foreach ($to_name as $item){ | 139 | foreach ($to_name as $item){ |
140 | // 找到了就退出去 | 140 | // 找到了就退出去 |
141 | - if(in_array(strtolower($item['email']),$this->shopkHotEmail)){ | 141 | + if(isset($this->shopkHotEmail[strtolower($item['email'])])){ |
142 | $isInsert = true; | 142 | $isInsert = true; |
143 | $data['from'] = $item['email']; | 143 | $data['from'] = $item['email']; |
144 | break; | 144 | break; |
-
请 注册 或 登录 后发表评论