|
@@ -147,6 +147,19 @@ class SyncMail { |
|
@@ -147,6 +147,19 @@ class SyncMail { |
147
|
return $this;
|
147
|
return $this;
|
148
|
}
|
148
|
}
|
149
|
|
149
|
|
|
|
150
|
+ protected $isSyncFolder = true;
|
|
|
151
|
+
|
|
|
152
|
+ /**
|
|
|
153
|
+ * 是否同步文件夹
|
|
|
154
|
+ * @return $this
|
|
|
155
|
+ * @author:dc
|
|
|
156
|
+ * @time 2025/9/13 15:34
|
|
|
157
|
+ */
|
|
|
158
|
+ public function noSyncFolder(){
|
|
|
159
|
+ $this->isSyncFolder = false;
|
|
|
160
|
+ return $this;
|
|
|
161
|
+ }
|
|
|
162
|
+
|
150
|
|
163
|
|
151
|
protected function emailId(){
|
164
|
protected function emailId(){
|
152
|
return $this->email['id'];
|
165
|
return $this->email['id'];
|
|
@@ -281,11 +294,14 @@ class SyncMail { |
|
@@ -281,11 +294,14 @@ class SyncMail { |
281
|
/*********************************** 同步文件夹 ***************************************/
|
294
|
/*********************************** 同步文件夹 ***************************************/
|
282
|
// 获取文件夹
|
295
|
// 获取文件夹
|
283
|
$folders = $this->imap->getFolders();
|
296
|
$folders = $this->imap->getFolders();
|
|
|
297
|
+
|
|
|
298
|
+ if($this->isSyncFolder){
|
284
|
$uuids = $this->folder($folders->getTopFolder());
|
299
|
$uuids = $this->folder($folders->getTopFolder());
|
285
|
if($uuids){
|
300
|
if($uuids){
|
286
|
// 删除以前的
|
301
|
// 删除以前的
|
287
|
$this->db->delete(folderSql::$table,['uuid.notin'=>$uuids,'email_id'=>$this->emailId()]);
|
302
|
$this->db->delete(folderSql::$table,['uuid.notin'=>$uuids,'email_id'=>$this->emailId()]);
|
288
|
}
|
303
|
}
|
|
|
304
|
+ }
|
289
|
|
305
|
|
290
|
if (!$syncMail) return true;
|
306
|
if (!$syncMail) return true;
|
291
|
|
307
|
|