I had a folder name containing the danish o (ø). Method getFolders of laravel-imap v1.4.4 threw an exception because
$items = imap_getmailboxes($this->connection, $this->getAddress(), $pattern); (in Client.php:363)
did not find anything and returned null.
Adjusting the following lines solved the problem (but surely is not the best solution)
Folder.php:123
public function __construct(Client $client, $structure) {
// ...
$this->full_name = $this->decodeName($structure->name);
$this->full_name_original = $structure->name;
// ...
}
Client.php:369
public function getFolders($hierarchical = true, $parent_folder = null) {
// ...
if ($hierarchical && $folder->hasChildren()) {
//$pattern = $folder->full_name.$folder->delimiter.'%';
$pattern = $folder->full_name_original.$folder->delimiter.'%';
// ...
}
// ...
}
Not sure if this is relevant, but the folder with the danish o did contain nothing but a single subfolder, which contains nothing but a single mail.
I had a folder name containing the danish o (ø). Method getFolders of laravel-imap v1.4.4 threw an exception because
$items = imap_getmailboxes($this->connection, $this->getAddress(), $pattern);
(in Client.php:363) did not find anything and returned null.Adjusting the following lines solved the problem (but surely is not the best solution)
Folder.php:123
Client.php:369
Not sure if this is relevant, but the folder with the danish o did contain nothing but a single subfolder, which contains nothing but a single mail.