|
@@ -28,10 +28,13 @@ class SyncMail { |
|
@@ -28,10 +28,13 @@ class SyncMail { |
28
|
// if(php_sapi_name() == 'cli'){
|
28
|
// if(php_sapi_name() == 'cli'){
|
29
|
$this->db = db();
|
29
|
$this->db = db();
|
30
|
|
30
|
|
31
|
- // 是否是预热邮件 aicc专用
|
|
|
32
|
- if(!empty($header['Aicc-Hot-Mail']) || !empty($header['aicc-hot-mail'])){
|
|
|
33
|
- return $this->hot($id);
|
31
|
+ if($data['is_hots']){
|
|
|
32
|
+ return true;
|
34
|
}
|
33
|
}
|
|
|
34
|
+ // 是否是预热邮件 aicc专用
|
|
|
35
|
+// if(!empty($header['Aicc-Hot-Mail']) || !empty($header['aicc-hot-mail'])){
|
|
|
36
|
+// return $this->hot($id);
|
|
|
37
|
+// }
|
35
|
|
38
|
|
36
|
// 是否在指定文件夹内
|
39
|
// 是否在指定文件夹内
|
37
|
$f = $this->db->value(folderSql::first($data['folder_id'],'folder'));
|
40
|
$f = $this->db->value(folderSql::first($data['folder_id'],'folder'));
|
|
@@ -39,21 +42,21 @@ class SyncMail { |
|
@@ -39,21 +42,21 @@ class SyncMail { |
39
|
return true;
|
42
|
return true;
|
40
|
}
|
43
|
}
|
41
|
$f = folderAlias($f);
|
44
|
$f = folderAlias($f);
|
42
|
- if($f=='发件箱'){
|
|
|
43
|
- if(empty($data['to_name'])){
|
|
|
44
|
- $data['to_name'] = [];
|
|
|
45
|
- }
|
|
|
46
|
-
|
|
|
47
|
- $data['to_name'] = is_array($data['to_name'])?$data['to_name']:json_decode($data['to_name']);
|
|
|
48
|
-
|
|
|
49
|
- $w = ['email' => array_map('strtolower',array_column($data['to_name'],'email'))];
|
|
|
50
|
- }else{
|
|
|
51
|
- $w = ['email' => strtolower($data['from'])];
|
|
|
52
|
- }
|
|
|
53
|
- // 是否在 预热邮箱中
|
|
|
54
|
- if($w['email'] && $this->db->count('select count(*) from `hot_mail` where '.dbWhere($w))){
|
|
|
55
|
- return $this->hot($id);
|
|
|
56
|
- }
|
45
|
+// if($f=='发件箱'){
|
|
|
46
|
+// if(empty($data['to_name'])){
|
|
|
47
|
+// $data['to_name'] = [];
|
|
|
48
|
+// }
|
|
|
49
|
+//
|
|
|
50
|
+// $data['to_name'] = is_array($data['to_name'])?$data['to_name']:json_decode($data['to_name']);
|
|
|
51
|
+//
|
|
|
52
|
+// $w = ['email' => array_map('strtolower',array_column($data['to_name'],'email'))];
|
|
|
53
|
+// }else{
|
|
|
54
|
+// $w = ['email' => strtolower($data['from'])];
|
|
|
55
|
+// }
|
|
|
56
|
+// // 是否在 预热邮箱中
|
|
|
57
|
+// if($w['email'] && $this->db->count('select count(*) from `hot_mail` where '.dbWhere($w))){
|
|
|
58
|
+// return $this->hot($id);
|
|
|
59
|
+// }
|
57
|
|
60
|
|
58
|
|
61
|
|
59
|
// 不是预热邮箱
|
62
|
// 不是预热邮箱
|
|
@@ -92,9 +95,9 @@ class SyncMail { |
|
@@ -92,9 +95,9 @@ class SyncMail { |
92
|
|
95
|
|
93
|
}
|
96
|
}
|
94
|
|
97
|
|
95
|
- private function hot($id){
|
|
|
96
|
- return $this->db->update(listsSql::$table,['is_hots'=>1],dbWhere(['id'=>$id]));
|
|
|
97
|
- }
|
98
|
+// private function hot($id){
|
|
|
99
|
+// return $this->db->update(listsSql::$table,['is_hots'=>1],dbWhere(['id'=>$id]));
|
|
|
100
|
+// }
|
98
|
|
101
|
|
99
|
|
102
|
|
100
|
/**
|
103
|
/**
|