...
|
...
|
@@ -371,28 +371,27 @@ class Home extends Base { |
|
|
|
|
|
if($data){
|
|
|
$sync_num = 0;
|
|
|
$data['to_name'] = json_decode($data['to_name']??"[]",true);
|
|
|
|
|
|
HOME_INFO_BODY:
|
|
|
$body = db()->first(bodySql::first($id));
|
|
|
if($body){
|
|
|
$data['body'] = json_decode($body['text_html'],true);
|
|
|
return [
|
|
|
'data' => $data
|
|
|
];
|
|
|
}
|
|
|
// 循环几次
|
|
|
if($sync_num < 1){
|
|
|
$data['to_name'] = json_decode($data['to_name']??"[]",true);
|
|
|
$body = db()->first(bodySql::first($id));
|
|
|
if($body){
|
|
|
$data['body'] = json_decode($body['text_html'],true);
|
|
|
return [
|
|
|
'data' => $data
|
|
|
];
|
|
|
}
|
|
|
|
|
|
$mail = new Mail($email['email'],base64_decode($email['passwird']),$email['imap']);
|
|
|
$mail = new Mail($email['email'],base64_decode($email['password']),$email['imap']);
|
|
|
|
|
|
if($mail->login()){
|
|
|
|
|
|
$folder = db()->value(folderSql::first(dbWhere(['id'=>$data['folder_id']]),'origin_folder'));
|
|
|
$folder = db()->value(folderSql::first(['id'=>$data['folder_id']],'origin_folder'));
|
|
|
if($folder){
|
|
|
$ret = $mail->syncBody($folder,$data['uid'],$id);
|
|
|
$sync_num++;
|
|
|
if($ret === true){
|
|
|
if($ret){
|
|
|
goto HOME_INFO_BODY;
|
|
|
}
|
|
|
}
|
...
|
...
|
|