0 votes
by (210 points)
edited

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

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.

by (210 points)
edited

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)."

by (210 points)
edited

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?

by (72.7k points)
edited

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

...