EAGetMail:无法与Gmail POP3连接

编程入门 行业动态 更新时间:2024-10-28 22:31:22
本文介绍了EAGetMail:无法与Gmail POP3连接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我正在使用以下代码使用POP3协议与GMAIL连接,但每次我收到的错误都被解读为:现有连接被远程主机强行关闭。 注意:我正在使用EAGetMail程序集 我在IndependentSoft上尝试了这个并且我能够连接,但它总是向我抛出异常使用EAGetMail。 请帮助........

I am using the below code to connect with GMAIL using POP3 protocol but everytime I am getting an error which is read as : "An existing connection was forcibly closed by the remote host." NOTE : I am using EAGetMail assembly I have tried this with IndependentSoft and I was able to connect, but it always throw exception to me using EAGetMail. Please help ........

MailServer oServer = new MailServer("pop.gmail", "username@gmail", "pwd1234", ServerProtocol.Pop3); MailClient oClient = new MailClient("TryIt"); oServer.SSLConnection = true; oServer.Port = 995; try { oClient.Connect(oServer); MailInfo[] infos = oClient.GetMailInfos(); Console.WriteLine(infos.Length); for (int i = 0; i < infos.Length; i++) { MailInfo info = infos[i]; Mail oMail = oClient.GetMail(info); Console.WriteLine("From: {0}", oMail.From.ToString()); //oClient.Delete(info); } oClient.Quit(); } catch (Exception ep) { Console.WriteLine(ep.Message); }

推荐答案

更多推荐

EAGetMail:无法与Gmail POP3连接

本文发布于:2023-11-23 17:27:53,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1622288.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:EAGetMail   Gmail

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!