无法使用openpop.net从传输连接C#中读取 [英] Unable to read from the transport connection C# using openpop.net

查看:122
本文介绍了无法使用openpop.net从传输连接C#中读取的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我正试图从gmail服务器访问邮件,但是当我尝试连接时它给了我错误:



Hi,
I am trying to access mail from gmail server, but when I try to connect it gives me error:

Unable to read data from transport connection: connection attempt failed because the connected party did not properly respond after a period of time, or establish connection failed because connected host has failed to respond.





当我在我的开发PC上运行相同的应用程序时它工作得很好,但是当在客户端PC上安装设置时它会出错




When I am running same application on my development PC it works perfectly, but when install setup on client PC it gives error

if (pop3Client.Connected)
                   pop3Client.Disconnect();
               pop3Client.Connect(popServerTextBox.Text, int.Parse(portTextBox.Text), useSslCheckBox.Checked);
               //pop3Client.Connect("pop.gmail.com", 995, null, Pop3Cli);

               pop3Client.Authenticate(loginTextBox.Text, passwordTextBox.Text,AuthenticationMethod.UsernameAndPassword);
               //pop3Client.Authenticate(loginTextBox.Text, passwordTextBox.Text);







但是一直给出同样的错误。

请帮忙,我被困住了。



谢谢



我尝试了什么:



我试过禁用防病毒和防火墙但是同样的错误。

我尝试使用端口587但给出了握手错误

我启用了为所有邮件启用POP,并且还启用了允许较少安全的应用程序




But giving same error all along.
Please help , I am stuck.

Thanks

What I have tried:

I tried disabling anti-virus and firewall but same error.
I tried using port 587 but gave "Handshake error"
I have enabled "Enabled POP for all Mail" , and also turned On Allow less secured apps

推荐答案

这是该PC上的配置或其他设置问题,您需要进行一些调试以了解发生的情况。在此期间,您可以查看使用POP - Gmail帮助在其他电子邮件客户端上阅读Gmail邮件 a href =https://support.google.com/mail/answer/7104828?hl=zh-CNtarget =_ blanktitle =新窗口> ^ ],并尝试通过手动连接新PC上的命令窗口。
This is a configuration or other settings issue at that PC and you will need to do some debugging to find out what is happening. in the meantime you can check Read Gmail messages on other email clients using POP - Gmail Help[^], and also try manually connecting through a command window on the new PC.


引用:

当我在我的开发PC上运行相同的应用程序时它工作得很好,但是在客户端PC上安装设置时会出现错误

When I am running same application on my development PC it works perfectly, but when install setup on client PC it gives error

这表示客户端系统或本地网络环境存在问题。



That indicates that it is a problem with the client system or it's local network environment.

Quote:

我试过禁用防病毒和防火墙但是同样的错误。

I tried disabling anti-virus and firewall but same error.

禁用是一个糟糕的选择。您需要检查的是,是否阻止了到端口995的传出数据包。但这必须不仅针对系统本身,而且针对将系统连接到网络的路由器。这些路由器有自己的防火墙和路由规则。例如,有些选项允许仅针对特定域的邮件服务。



从您的描述中,这是您可能遇到的最可能的问题:请求被路由器阻止。如果客户端系统是较大网络(如公司或机构)的一部分,请检查他们是否有网络管理员。如果有,请与他联系。



Disabling is a bad choice. All you have to check is if outgoing packets to port 995 are blocked. But this must be not only done for the system itself but also for the router that connects the system to the net. These routers have their own firewall and routing rules. Some have for example options to allow mail services only for specific domains.

From your description this is the most probable source of your problem: The request is blocked by the router. If the client system is part of larger network (like a company or instution), check if they have a network administrator. If so, contact him.

引用:

我尝试使用端口587但是给出了握手错误

I tried using port 587 but gave "Handshake error"

端口587是带有TLS / STARTTLS的SMTP。这是一个不同的协议,以便您收到错误。但它告诉你,你至少有一个连接。



Port 587 is SMTP with TLS/STARTTLS. That is a different protocol so that you get an error. But it tells you that you got at least a connection.

引用:

我已启用为所有邮件启用POP,并且还启用了允许较少安全的应用

I have enabled "Enabled POP for all Mail" , and also turned On Allow less secured apps

这与您没有连接时无关紧要。有必要成功登录并使用带有Gamil的POP3。

That does not matter while you get no connection. It is necessary to successfully login and use POP3 with Gamil.


这篇关于无法使用openpop.net从传输连接C#中读取的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆