...
|
...
|
@@ -466,10 +466,10 @@ class Imap { |
|
|
* 修改文件夹名称
|
|
|
* @param string $oldFolder 久文件夹名称
|
|
|
* @param string $newFolder 新文件夹名称
|
|
|
* @return bool
|
|
|
* @return array
|
|
|
* @throws \Exception
|
|
|
* @author:dc
|
|
|
* @time 2022/11/25 10:24
|
|
|
* @time 2023/4/14 11:47
|
|
|
*/
|
|
|
public function folderRename(string $oldFolder, string $newFolder){
|
|
|
// 需要转码
|
...
|
...
|
@@ -478,17 +478,16 @@ class Imap { |
|
|
$res = $this->request("RENAME {$oldFolder} {$newFolder}");
|
|
|
|
|
|
if ($res[0] == 'ok'){
|
|
|
return true;
|
|
|
return [true,$newFolder];
|
|
|
}
|
|
|
|
|
|
throw new \Exception('rename folder error:'.end($res[1]));
|
|
|
return [false,end($res[1])];
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 删除文件夹
|
|
|
* @param string $folder
|
|
|
* @return bool
|
|
|
* @throws \Exception
|
|
|
* @author:dc
|
|
|
* @time 2022/11/25 10:25
|
|
|
*/
|
...
|
...
|
@@ -505,7 +504,7 @@ class Imap { |
|
|
return true;
|
|
|
}
|
|
|
|
|
|
throw new \Exception('rename folder error:'.end($res[1]));
|
|
|
return false;
|
|
|
|
|
|
}
|
|
|
|
...
|
...
|
|