Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when trying fetch messages from container #167

Closed
kekdev opened this issue Sep 19, 2017 · 1 comment
Closed

Error when trying fetch messages from container #167

kekdev opened this issue Sep 19, 2017 · 1 comment
Labels
Milestone

Comments

@kekdev
Copy link

kekdev commented Sep 19, 2017

imap_getmailboxes returns also mailbox container. It needs additional attributes check for LATT_NOSELECT according to documentation

Gmail as example
PHP Fatal error: Uncaught ErrorException: Unknown: [NONEXISTENT] Unknown Mailbox: [Gmail] (now in authenticated state) (Failure) (errflg=2) in Unknown:0

@Slamdunk
Copy link
Collaborator

With the feature implemented in #184 you can now get mailbox attributes by calling $mailbox->getAttributes(), so you can skip continer mailboxes with a code like:

if ($mailbox->getAttributes() & \LATT_NOSELECT) {
    // skip this mailbox
}

Thank you for the feedback.

@Slamdunk Slamdunk added this to the 1.0 milestone Sep 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants