使用C#检索电子邮件? [英] retrieve email using c#?
问题描述
我要检索从我转到爸爸电子邮件,使用C#帐户。我测试 OpenPop.NET 做到这一点,像这样:
I want to retrieve emails from my Go Daddy account using C#. I tested OpenPop.NET to do that like so:
OpenPop.Pop3.Pop3Client PopClient = new OpenPop.Pop3.Pop3Client();
PopClient.Connect("pop.secureserver.net", 995, true);
PopClient.Authenticate("username", "pass");
我的问题是服务器不接受用户凭据。我敢肯定凭据确定。
My problem is that the server does not accept the user credentials. I'm sure the credentials are OK.
我曾尝试相同的代码与我的Gmail帐户和每一件事情去确定。是什么缺少转到爸爸要我设置?
I have tried the same code with my Gmail account and every thing goes OK. Is something missing that Go Daddy wants me to set?
有另一种喜欢的 OpenPop.NET ,我可以用它来检索使用POP3协议的电子邮件?
Is there another a .NET tool like OpenPop.NET that I can use to retrieve emails using the POP3 protocol?
推荐答案
我发现 OpenPop.Pop3.AuthenticationMethod.UsernameAndPassword
是缺少的一部分。我已经修改了代码,是继和它的作品。
I found out that OpenPop.Pop3.AuthenticationMethod.UsernameAndPassword
is the missing part. I have modified the code to be following and it works.
OpenPop.Pop3.Pop3Client PopClient = new OpenPop.Pop3.Pop3Client();
PopClient.Connect("pop.secureserver.net", 995, true);
PopClient.Authenticate("username", "pass", OpenPop.Pop3.AuthenticationMethod.UsernameAndPassword);
这篇关于使用C#检索电子邮件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!