retrieve email using c#?

会有一股神秘感。 提交于 2019-11-30 08:37:10
Khalid Omar

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);

Port 995 is Secure POP3 which doesn't have to be supported by your mail provider.

Use 110 for regular POP3.

Its probably because your email account is not configured for Pop by default.
Go to settings in your email account and enable pop.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!