...
|
...
|
@@ -28,10 +28,13 @@ class SyncMail { |
|
|
// if(php_sapi_name() == 'cli'){
|
|
|
$this->db = db();
|
|
|
|
|
|
// 是否是预热邮件 aicc专用
|
|
|
if(!empty($header['Aicc-Hot-Mail']) || !empty($header['aicc-hot-mail'])){
|
|
|
return $this->hot($id);
|
|
|
if($data['is_hots']){
|
|
|
return true;
|
|
|
}
|
|
|
// 是否是预热邮件 aicc专用
|
|
|
// if(!empty($header['Aicc-Hot-Mail']) || !empty($header['aicc-hot-mail'])){
|
|
|
// return $this->hot($id);
|
|
|
// }
|
|
|
|
|
|
// 是否在指定文件夹内
|
|
|
$f = $this->db->value(folderSql::first($data['folder_id'],'folder'));
|
...
|
...
|
@@ -39,21 +42,21 @@ class SyncMail { |
|
|
return true;
|
|
|
}
|
|
|
$f = folderAlias($f);
|
|
|
if($f=='发件箱'){
|
|
|
if(empty($data['to_name'])){
|
|
|
$data['to_name'] = [];
|
|
|
}
|
|
|
|
|
|
$data['to_name'] = is_array($data['to_name'])?$data['to_name']:json_decode($data['to_name']);
|
|
|
|
|
|
$w = ['email' => array_map('strtolower',array_column($data['to_name'],'email'))];
|
|
|
}else{
|
|
|
$w = ['email' => strtolower($data['from'])];
|
|
|
}
|
|
|
// 是否在 预热邮箱中
|
|
|
if($w['email'] && $this->db->count('select count(*) from `hot_mail` where '.dbWhere($w))){
|
|
|
return $this->hot($id);
|
|
|
}
|
|
|
// if($f=='发件箱'){
|
|
|
// if(empty($data['to_name'])){
|
|
|
// $data['to_name'] = [];
|
|
|
// }
|
|
|
//
|
|
|
// $data['to_name'] = is_array($data['to_name'])?$data['to_name']:json_decode($data['to_name']);
|
|
|
//
|
|
|
// $w = ['email' => array_map('strtolower',array_column($data['to_name'],'email'))];
|
|
|
// }else{
|
|
|
// $w = ['email' => strtolower($data['from'])];
|
|
|
// }
|
|
|
// // 是否在 预热邮箱中
|
|
|
// if($w['email'] && $this->db->count('select count(*) from `hot_mail` where '.dbWhere($w))){
|
|
|
// return $this->hot($id);
|
|
|
// }
|
|
|
|
|
|
|
|
|
// 不是预热邮箱
|
...
|
...
|
@@ -92,9 +95,9 @@ class SyncMail { |
|
|
|
|
|
}
|
|
|
|
|
|
private function hot($id){
|
|
|
return $this->db->update(listsSql::$table,['is_hots'=>1],dbWhere(['id'=>$id]));
|
|
|
}
|
|
|
// private function hot($id){
|
|
|
// return $this->db->update(listsSql::$table,['is_hots'=>1],dbWhere(['id'=>$id]));
|
|
|
// }
|
|
|
|
|
|
|
|
|
/**
|
...
|
...
|
|