Gmail System Folders with CFImap

I’ve gotten a few question about this lately. 

When you do a CFIMap “listAllFolders” operation against Gmail, some folders don’t show up by default. Unfortunately they are among the more important folders like Drafts, Sent Mail, Spam, etc. They are there, but for some reason they don’t show up, even with recurse set to true.
I’m not sure the reason, I’m sure it has something to do with the fact that Gmail works with “Labels” and not folders.
The solution is to know what to target. To get the system folders you have to target the folder: “[Gmail].”
Here’s the code:

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s