我在 C# 中使用 IMap 从 gmail 中读取邮件。我在同一个邮箱上创建了多个(五个)TCP 连接以加快数据读取速度。 Google 允许 15 个邮箱同时存在
https://support.google.com/mail/answer/97150?hl=en
但是我在读取数据时遇到了错误
SslStream.Read(byte[] buffer, int offset, int count);
说“无法从传输连接读取数据:现有连接被远程主机强行关闭。”。
我使用以下设置供您引用
imap.gmail.com 端口:993
完整的堆栈跟踪如下
: Unable to write data to the transport connection: An existing connection was forcibly closed by the remote host.
错误2015-07-10
05:46:43 – Stack Strace :: at System.Net.Sockets.NetworkStream.Write(Byte[] buffer, Int32 offset, Int32 size)
at System.Net.Security._SslStream.StartWriting(Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest) at System.Net.Security._SslStream.ProcessWrite(Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslStream.Write(Byte[] buffer, Int32 offset, Int32 count) at CDT.WebMailReader.CloudMailReader.receiveResponse(ReceiveResponseParams responseParams)
我在很多论坛上检查了解决方案,但没有得到任何解决方案。有人可以为它提出解决方案吗。
提前致谢
马尤什
最佳答案
尝试使用143端口连接。 如果问题依旧,请检查您的网络环境
关于c# - 无法从传输连接 IMAP 读取数据,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31342786/