Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/320.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 无法检索特定邮件服务器上的电子邮件文件夹。。可能原因_C#_.net_Imapx - Fatal编程技术网

C# 无法检索特定邮件服务器上的电子邮件文件夹。。可能原因

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检索电子邮件帐户的文件夹:

 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服务器返回的有关文件夹的信息时出现问题。某些服务器不引用文件夹名称