The problem could be that your Gmail account has IMAP disabled for the “All Mail” label or that IMAP is disabled. So this is how to troubleshoot this error:
- Log into your Gmail account at https://mail.google.com.
- Go to your Gmail settings and select “Forwarding and POP/IMAP” (the direct link should be https://mail.google.com/mail/u/0/#settings/fwdandpop).Please verify the following:
- “Enable IMAP” should be selected.
- “Do not limit the number of messages in an IMAP folder” should be selected.
- Save the above settings.
- Go to the “Labels” tab (the direct link should be: https://mail.google.com/mail/u/0/#settings/labels).
- Verify that “All Mail” have “Show in IMAP” enabled.