This project is read-only.

Gmail folders

Jul 1, 2012 at 1:08 PM
Edited Jul 1, 2012 at 1:25 PM


I'm experimenting with this library and it's very nice.

I just connected to my Gmail account using the ImapClient. This goes well, I can connect to my inbox and retrieve messages, but I cannot seem to connect to the Starred or Sent Mail folders.

This should be client.Select("[Gmail]/Starred"); or for Sent mail client.Select("[Gmail]/Sent Mail");, but it returns as null and no messages can be found.

How can I retrieve messages from my Gmail Starred folder?

This is my code:


var client = new ImapClient();
const string host = "";
const int port = 993;
client.Security = SecurityPolicies.Explicit;
client.Connect(host, port);
client.Authenticate("", "myPassword", SaslMechanics.Login);

var select = client.Select("[Gmail]/Starred");
// select.MailboxInfo.Exists = null


Thanks in advance!


Jul 1, 2012 at 1:36 PM

I figured it out. It seems that the selected language for Gmail is quite important.

Since my Gmail language is localized to the Dutch language I need to connect to [Gmail]/Met ster.

So client.Select("[Gmail]/Met ster") returns the expected result.

Jul 1, 2012 at 5:44 PM

Sry I couldn't reply earlier, I glad you have found the solution :)