fix IMAP folders

This commit is contained in:
Yurii
2026-01-09 18:48:15 +02:00
parent 309ec572c4
commit 79d5cd60c9
2 changed files with 2 additions and 2 deletions

View File

@@ -110,7 +110,7 @@ class Fetcher
$folder = mb_convert_encoding($folderOriginal, 'UTF7-IMAP', 'UTF-8');
try {
$storage->selectFolder($folder);
$storage->selectFolder($folderOriginal);
} catch (Throwable $e) {
$message = "{$account->getEntityType()} {$account->getId()}, " .
"could not select folder '$folder'; {$e->getMessage()}";

View File

@@ -244,7 +244,7 @@ class DirectoryTreeStorage implements Storage
$folders = $this->mailbox->folders()->get();
foreach ($folders as $folder) {
$output[] = $folder->path();
$output[] = mb_convert_encoding($folder->path(), 'UTF-8', 'UTF7-IMAP');
}
} catch (CommonException $e) {
throw new ImapError($e->getMessage(), previous: $e);