Imap.GetFolderList() returns [GMail] as root folder

0 votes
asked Jul 4, 2011 by nipanesanjay (210 points)
edited Jul 4, 2011

Hi,

I am using Imap.GetFolderList() for returning the list of root level folders of GMail account. But this list also contains one folder as '[Gmail]'. What should I do to avoid this folder returning from the GetFolderList() method?

Thanks Sanjay

Applies to: Rebex Secure Mail

1 Answer

0 votes
answered Jul 4, 2011 by Lukas Pokorny (108,250 points)
edited Jul 4, 2011

The [Gmail] folder is actually a root-level folder and is present in the list as returned from the IMAP server. It contains sub-folders such as Spam, Drafts or Starred. Why would you want to remove it from the list of root level folders?

commented Jul 4, 2011 by nipanesanjay (210 points)
edited Jul 4, 2011

Thanks man. I just want to filter it from the returned list, if possible. Anyways I can check for the folder which doesnt contain special char like [] in folder name. So not an issue. I was just checking if anything is already there through REBEX itself.

commented Jul 4, 2011 by Lukas Pokorny (108,250 points)
edited Jul 4, 2011

Yes, filtering it out programatically is the way to go. Checking for [] characters instead of for [Gmail] is also a good idea because in some countries (such as Germany), the folders is called [GoogleMail] due to some trademark issues.

...