Unable to retrieve email folders on specific mail server.. possible causes

故事扮演 提交于 2019-12-11 14:19:19

问题


I am failing to retrieve the folders of my email account using ImapX:

 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;

and that is:

'm_ImapClient.Folders' threw an exception of type 'System.NullReferenceException' ImapX.Collections.CommonFolderCollection {System.NullReferenceException}

What's wrong, I'm using IMAP, ssl, port 993. ImapX 2. This works for imap.google.com on 993, but doesn't work for another network server.. Any ideas of why this could happen?


回答1:


This issue has been fixed, thank you! For details see Issue: Unable to get mail folders after successfull login on IMAP server. The problem occured on parsing the information returned by the IMAPX server about folders. Some servers do not quote the folder names.



来源:https://stackoverflow.com/questions/18985371/unable-to-retrieve-email-folders-on-specific-mail-server-possible-causes

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!