Gmail account doesnt crawl 'All Mail' folder

0 votes
asked Aug 8, 2011 by nipanesanjay (210 points)
edited Aug 8, 2011

Hi,

We are using REBEX component for Email Crawling different accounts. When we are crawling any gmail account then we are considering all the mail box folders created inside the account. We are able to fetch "Travel", "Receipts","Personal","Work","[Gmail]" and "Inbox" folders. But there is 'All Mail' folder also in the account. Question is why Rebex component not taking into account this folder as well. Please suggest on this.

Thanks Sanjay

Applies to: Rebex Secure Mail

1 Answer

0 votes
answered Aug 8, 2011 by Lukas Matyska (59,450 points)
edited Aug 8, 2011

The 'All Mail' folder is special system label under the '[Gmail]' folder.

To select the 'All Mail' folder, please call the imap.SelectFolder("[Gmail]/All Mail").

To list subfolders of the '[Gmail]' folder, please call the imap.GetFolderList("[Gmail]") method.

commented Aug 8, 2011 by nipanesanjay (210 points)
edited Aug 8, 2011

I am selecting all the mail folders and then also lloking for subfolders, if any created inside root folders. When I am getting "[Gmail]" as root folder in first iteration and next time when I am doing imapConnection.SelectFolder(folder); // where folder = "[Gmail]" it gives exception as "Invalid folder: [Gmail] (Failure) (NO)."

commented Aug 8, 2011 by nipanesanjay (210 points)
edited Aug 8, 2011

Actually i m doing, imapConnection.SelectFolder(folder);

// Get the sub-folders under currently selected folder ImapFolderCollection subFolders = imapConnection.GetFolderList(folder);

Can I only use second line of code?

commented Aug 8, 2011 by Lukas Matyska (59,450 points)
edited Aug 8, 2011

Gmail doesn't support to select the '[Gmail]' folder. But you can list and select its subfolders.

...