Quantcast
Channel: ImapX 2
Viewing all articles
Browse latest Browse all 1952

Commented Unassigned: Unable to get mail folders after successfull login on IMAP server [1779]

$
0
0
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 **

Sorry for double posting the comment, I don 't know how to delete it. Here is some more info:
from ImapX source code:
in ImapClient.cs at line 134 there is a call for var folder = Folder.Parse(data[i], ref parent, this); , the call is made with data[i] = "* LIST (\HasNoChildren) "/" Calendar and parent is null, inside the Folder.Parse, the regex Match function is not successful and so it returns null, what's happening?


Viewing all articles
Browse latest Browse all 1952

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>