作者 邓超

1

@@ -371,11 +371,9 @@ class Home extends Base { @@ -371,11 +371,9 @@ class Home extends Base {
371 371
372 if($data){ 372 if($data){
373 $sync_num = 0; 373 $sync_num = 0;
  374 + $data['to_name'] = json_decode($data['to_name']??"[]",true);
374 375
375 HOME_INFO_BODY: 376 HOME_INFO_BODY:
376 - // 循环几次  
377 - if($sync_num < 1){  
378 - $data['to_name'] = json_decode($data['to_name']??"[]",true);  
379 $body = db()->first(bodySql::first($id)); 377 $body = db()->first(bodySql::first($id));
380 if($body){ 378 if($body){
381 $data['body'] = json_decode($body['text_html'],true); 379 $data['body'] = json_decode($body['text_html'],true);
@@ -383,16 +381,17 @@ class Home extends Base { @@ -383,16 +381,17 @@ class Home extends Base {
383 'data' => $data 381 'data' => $data
384 ]; 382 ];
385 } 383 }
386 -  
387 - $mail = new Mail($email['email'],base64_decode($email['passwird']),$email['imap']); 384 + // 循环几次
  385 + if($sync_num < 1){
  386 + $mail = new Mail($email['email'],base64_decode($email['password']),$email['imap']);
388 387
389 if($mail->login()){ 388 if($mail->login()){
390 389
391 - $folder = db()->value(folderSql::first(dbWhere(['id'=>$data['folder_id']]),'origin_folder')); 390 + $folder = db()->value(folderSql::first(['id'=>$data['folder_id']],'origin_folder'));
392 if($folder){ 391 if($folder){
393 $ret = $mail->syncBody($folder,$data['uid'],$id); 392 $ret = $mail->syncBody($folder,$data['uid'],$id);
394 $sync_num++; 393 $sync_num++;
395 - if($ret === true){ 394 + if($ret){
396 goto HOME_INFO_BODY; 395 goto HOME_INFO_BODY;
397 } 396 }
398 } 397 }