作者 邓超

优化文件夹

@@ -46,7 +46,8 @@ class Login { @@ -46,7 +46,8 @@ class Login {
46 } 46 }
47 47
48 // 进行远程登录,验证 48 // 进行远程登录,验证
49 - $login = (new Mail($formData['email'],$formData['password'],$formData['imap']))->login(false); 49 + $mailClient = (new Mail($formData['email'],$formData['password'],$formData['imap']));
  50 + $login = $mailClient->login(false);
50 if( $login === 0){ 51 if( $login === 0){
51 app()->e('login_error_imap'); 52 app()->e('login_error_imap');
52 }elseif ($login === -1){ 53 }elseif ($login === -1){
@@ -89,6 +90,7 @@ class Login { @@ -89,6 +90,7 @@ class Login {
89 90
90 91
91 if($ret){ 92 if($ret){
  93 + $mailClient->syncFolder(db()->value(emailSql::hasEmail($formData['email'])));
92 app()->_json( 94 app()->_json(
93 db()->first( 95 db()->first(
94 emailSql::first( 96 emailSql::first(