0 votes
by (210 points)
edited

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
by (144k points)
edited

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?

by (210 points)
edited

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.

by (144k points)
edited

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.

...