adding more detailed error logging and non-breaking imap folder creation

This commit is contained in:
Alexander Vassilevski 2021-01-24 00:18:26 -08:00
parent ada0e4c281
commit 69e87dbf22

View File

@ -73,11 +73,12 @@ class UserHooks {
return false;
}
foreach ($folders as $folder) {
if (! @\imap_createmailbox( $mbox,
if (! @\imap_createmailbox(
$mbox,
\imap_utf7_encode("{".$server."}INBOX.".$folder))) {
$message = 'Error creating ' . $folder . ' folder.';
$message = 'Error creating ' . $folder . ' folder: ' .
\imap_last_error();
$this->logger->error($message);
return false;
}
}
\imap_close($mbox);