我无法使用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;
那就是:
'm_ImapClient.Folders' threw an exception of type 'System.NullReferenceException' ImapX.Collections.CommonFolderCollection {System.NullReferenceException}
怎么了,我使用的是IMAP,ssl,端口993。ImapX 2.这适用于 993 上的 imap.google.com,但不适用于其他网络服务器。为什么会发生这种情况的任何想法?
此问题
已修复,谢谢!有关详细信息,请参阅问题:成功登录 IMAP 服务器后无法获取邮件文件夹。解析 IMAPX 服务器返回的有关文件夹的信息时出现问题。某些服务器不引用文件夹名称。