|
@@ -537,7 +537,7 @@ class Home extends Base { |
|
@@ -537,7 +537,7 @@ class Home extends Base { |
537
|
// 开始远程
|
537
|
// 开始远程
|
538
|
$mailInstance = new Mail($emails[$eid]['email'],base64_decode($emails[$eid]['password']),$emails[$eid]['imap']);
|
538
|
$mailInstance = new Mail($emails[$eid]['email'],base64_decode($emails[$eid]['password']),$emails[$eid]['imap']);
|
539
|
|
539
|
|
540
|
- if($mailInstance->login()){
|
540
|
+ if($mailInstance->login()==1){
|
541
|
$ret = $call($mailInstance,array_column($uid,'uid'),$folder['origin_folder'],$to_origin_folder['origin_folder']);
|
541
|
$ret = $call($mailInstance,array_column($uid,'uid'),$folder['origin_folder'],$to_origin_folder['origin_folder']);
|
542
|
// TODO:: 这个过程无法保证原子性。没办法
|
542
|
// TODO:: 这个过程无法保证原子性。没办法
|
543
|
// 先复制
|
543
|
// 先复制
|
|
@@ -590,8 +590,8 @@ class Home extends Base { |
|
@@ -590,8 +590,8 @@ class Home extends Base { |
590
|
public function expunge(){
|
590
|
public function expunge(){
|
591
|
$email = $this->getEmail();
|
591
|
$email = $this->getEmail();
|
592
|
$mailInstance = new Mail($email['email'],base64_decode($email['password']),$email['imap']);
|
592
|
$mailInstance = new Mail($email['email'],base64_decode($email['password']),$email['imap']);
|
593
|
- $mailInstance->login();
|
|
|
594
|
- if($mailInstance->expunge()){
|
593
|
+
|
|
|
594
|
+ if($mailInstance->login()==1 && $mailInstance->expunge()){
|
595
|
app()->_json([]);
|
595
|
app()->_json([]);
|
596
|
}
|
596
|
}
|
597
|
|
597
|
|
|
@@ -668,7 +668,7 @@ class Home extends Base { |
|
@@ -668,7 +668,7 @@ class Home extends Base { |
668
|
// 开始远程
|
668
|
// 开始远程
|
669
|
$mailInstance = new Mail($emails[$eid]['email'],base64_decode($emails[$eid]['password']),$emails[$eid]['imap']);
|
669
|
$mailInstance = new Mail($emails[$eid]['email'],base64_decode($emails[$eid]['password']),$emails[$eid]['imap']);
|
670
|
|
670
|
|
671
|
- if($mailInstance->login()){
|
671
|
+ if($mailInstance->login()==1){
|
672
|
switch ($d){
|
672
|
switch ($d){
|
673
|
// 已读 未读
|
673
|
// 已读 未读
|
674
|
case 'seen':{
|
674
|
case 'seen':{
|
|
@@ -739,7 +739,7 @@ class Home extends Base { |
|
@@ -739,7 +739,7 @@ class Home extends Base { |
739
|
db()->delete(bodySql::$table,['lists_id'=>$id]);
|
739
|
db()->delete(bodySql::$table,['lists_id'=>$id]);
|
740
|
//同步基础信息
|
740
|
//同步基础信息
|
741
|
$mail = new Mail($email['email'],base64_decode($email['password']),$email['imap']);
|
741
|
$mail = new Mail($email['email'],base64_decode($email['password']),$email['imap']);
|
742
|
- if($mail->login()){
|
742
|
+ if($mail->login()==1){
|
743
|
$folder = db()->value(folderSql::first(['id'=>$data['folder_id']],'origin_folder'));
|
743
|
$folder = db()->value(folderSql::first(['id'=>$data['folder_id']],'origin_folder'));
|
744
|
if($folder){
|
744
|
if($folder){
|
745
|
$mail->client->selectFolder($folder);
|
745
|
$mail->client->selectFolder($folder);
|
|
@@ -818,7 +818,7 @@ class Home extends Base { |
|
@@ -818,7 +818,7 @@ class Home extends Base { |
818
|
if($data['uid']&&$sync_num < 1){
|
818
|
if($data['uid']&&$sync_num < 1){
|
819
|
$mail = new Mail($email['email'],base64_decode($email['password']),$email['imap']);
|
819
|
$mail = new Mail($email['email'],base64_decode($email['password']),$email['imap']);
|
820
|
|
820
|
|
821
|
- if($mail->login()){
|
821
|
+ if($mail->login()==1){
|
822
|
|
822
|
|
823
|
$folder = db()->value(folderSql::first(['id'=>$data['folder_id']],'origin_folder'));
|
823
|
$folder = db()->value(folderSql::first(['id'=>$data['folder_id']],'origin_folder'));
|
824
|
if($folder){
|
824
|
if($folder){
|