php-imap icon indicating copy to clipboard operation
php-imap copied to clipboard

Children Folders not loading when parent folder has german umlauts.

Open DGINXREAL opened this issue 1 year ago • 1 comments

Hello i find a problem and i don't know how i can fix that.

When i try to load my mailbox and getFolders(), all parents are present in the collection. I have two Folders with german umlauts (like öÖäÄüÜ) in the parent list, the childrens always empty, but hasChildren() is always true.

if i rename the folders and remove the german umlauts, the folder children are loaded.

I'm using IONOS Mail Server.

As Example

  • Folder A. <- Loaded
    • Folder AA. <- Loaded
    • Folder AB <- Loaded
  • FoÖäer B <- Loaded
    • Folder BA <- Not loaded because parent has Öä
    • Folder BB <- Not loaded because parent has Öä
  • FoÖäer C <- Loaded
  • Folder D <- Loaded

Has Some one an Idea how i can fix that?

DGINXREAL avatar Jun 05 '24 19:06 DGINXREAL

Hello, I also had the problem with several different servers. I replaced the following in the getFolders method in Client.php.

$pattern = $folder->full_name.$folder->delimiter.'%'; replace with : $pattern = $folder->path.$folder->delimiter.'%';

That worked for me.

yeli69 avatar Jul 15 '24 16:07 yeli69