Webklex / php-imap

PHP-IMAP is a wrapper for common IMAP communication without the need to have the php-imap module installed / enabled. The protocol is completely integrated and therefore supports IMAP IDLE operation and the "new" oAuth authentication process as well.
https://www.php-imap.com
MIT License
302 stars 144 forks source link

Children Folders not loading when parent folder has german umlauts. #497

Open DGINXREAL opened 3 months ago

DGINXREAL commented 3 months ago

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

Has Some one an Idea how i can fix that?

yeli69 commented 2 months ago

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.