【发布时间】:2015-08-23 13:51:47
【问题描述】:
我们的应用程序需要从 Gmail Sent 文件夹中获取电子邮件主题、发件人、收件人等。它工作了几个月,但它突然开始起作用。我们正在使用 AE.Net.Mail 来创建 ImapClient
new ImapClient("imap.gmail.com", "不适用", () => GmailSaslRequestBuilder.Build(email, this._authenticator.GetAccessToken()), ImapClient.AuthMethods.XOAUTH2, 993, 真);
这是我收到的错误消息,我想知道我们是否受到限制以及如何解决这个问题或者还有什么问题?
System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host<newline>
at System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)<newline>
at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)<newline> --- End of inner exception stack trace ---<newline>
at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)<newline>
at System.Net.FixedSizeReader.ReadPacket(Byte[] buffer, Int32 offset, Int32 count)<newline>
at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest)<newline>
at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest)<newline>
at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest)<newline>
at System.Net.Security.SslState.ForceAuthentication(Boolean receiveFirst, Byte[] buffer, AsyncProtocolRequest asyncRequest)<newline>
at System.Net.Security.SslState.ProcessAuthentication(LazyAsyncResult lazyResult)<newline>
at System.Net.Security.SslStream.AuthenticateAsClient(String targetHost, X509CertificateCollection clientCertificates, SslProtocols enabledSslProtocols, Boolean checkCertificateRevocation)<newline>
at System.Net.Security.SslStream.AuthenticateAsClient(String targetHost)<newline>
at AE.Net.Mail.TextClient.Connect(String hostname, Int32 port, Boolean ssl)<newline>
at AE.Net.Mail.ImapClient..ctor(String host, String username, Func`1 getPassword, AuthMethods method, Int32 port, Boolean secure)<newline>
【问题讨论】:
-
套接字被强制关闭,并且充满了名为“Authenticate”的例程的跟踪将使我的第一个猜测是身份验证失败。你为什么怀疑节流?
标签: gmail gmail-imap throttling