C# 无法检索特定邮件服务器上的电子邮件文件夹。。可能原因
我无法使用ImapX检索电子邮件帐户的文件夹:C# 无法检索特定邮件服务器上的电子邮件文件夹。。可能原因,c#,.net,imapx,C#,.net,Imapx,我无法使用ImapX检索电子邮件帐户的文件夹: ImapX.ImapClient m_ImapClient = new ImapX.ImapClient( ImapServerAddress, (int) ImapServerPort, System.Security.Authentication.SslProtocols.Ssl3, false); m_ImapClient.Connect(); m_ImapClient.Login( EmailAddress, EmailPasswor
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。IMAPX2。这适用于993上的imap.google.com,但不适用于其他网络服务器。。你知道为什么会发生这种情况吗?这个问题已经解决了,谢谢!有关详细信息,请参阅。分析IMAPX服务器返回的有关文件夹的信息时出现问题。某些服务器不引用文件夹名称