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

asked 04 Jul '11, 13:13

nipanesanjay's gravatar image

nipanesanjay
171
accept rate: 0%


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?

link

answered 04 Jul '11, 13:59

Lukas%20Pokorny's gravatar image

Lukas Pokorny ♦♦
2.4k28
accept rate: 31%

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.

(04 Jul '11, 14:06) nipanesanjay

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.

(04 Jul '11, 17:12) Lukas Pokorny ♦♦
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×76

Asked: 04 Jul '11, 13:13

Seen: 469 times

Last updated: 04 Jul '11, 17:12