I am using this simple code to access the contents of an email via imap server:
```
ImapX.ImapClient m_ImapClient = new ImapX.ImapClient( ImapServerAddress, (int) ImapServerPort, System.Security.Authentication.SslProtocols.Ssl3, false);
m_ImapClient.Connect();
m_ImapClient.Login( EmailAddress, EmailPassword);
//the two functions above each return true
//this last statement throws an exception:
ImapX.Collections.FolderCollection vFolders = m_ImapClient.Folders;
```
the code works for imap.google.com on 993. But it does not work for another internal imap server, it connects, it logs in successfully but when I try to the get the Folders member it throws a "null object error". What could be the cause of this?
Comments: ** Comment from web user: ak89 **
```
ImapX.ImapClient m_ImapClient = new ImapX.ImapClient( ImapServerAddress, (int) ImapServerPort, System.Security.Authentication.SslProtocols.Ssl3, false);
m_ImapClient.Connect();
m_ImapClient.Login( EmailAddress, EmailPassword);
//the two functions above each return true
//this last statement throws an exception:
ImapX.Collections.FolderCollection vFolders = m_ImapClient.Folders;
```
the code works for imap.google.com on 993. But it does not work for another internal imap server, it connects, it logs in successfully but when I try to the get the Folders member it throws a "null object error". What could be the cause of this?
Comments: ** Comment from web user: ak89 **
I think I have identified the problem, it consists in the fact that Google's IMAP server returns: * LIST (\HasNoChildren) "/" "INBOX" and my IMAP server returns: * LIST (\HasNoChildren) "/" Calendar, so the folder name isn't quoted. Now, the question is, is this normal or not?
best regards,
ak89