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: pavel_azanov **
```
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: pavel_azanov **
Hi ak89,
I saw your mail message right now, thank you for the details. Seems you're right, and the problem lies in quoting. I will update the Regex now, and make a new commit so you can test it right away.
Best regards,
Pavel