博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
C# Use Pop3Client to read gmail
阅读量:6974 次
发布时间:2019-06-27

本文共 503 字,大约阅读时间需要 1 分钟。

host = "pop.gmail.com"

user = "xxxxx@gmail.com"

password = "xxxx"

port = 995

Pop3Client client = new Pop3Client();

client.connet(host, port, true);

client.Authenticate(user, password, AuthenticationMethod.UsernameAndPassword);

int mailCount = client.GetMessageCount();

在執行authentication時出現exception, InvalidLoginException

解決方法參考 : https://github.com/foens/hpop/issues/39

1-enable the pop at Configurations / Forwarding and POP/IMAP

2- follow this link: 
and activate for less secure apps. (set [turn on])

 

转载地址:http://pnesl.baihongyu.com/

你可能感兴趣的文章
php curl请求转发
查看>>
设置 cell点击 背景色
查看>>
提高代码质量 CheckStyle FindBugs PMD
查看>>
【Java】HashTable和HashMap区别
查看>>
shell技巧之以逆序形式打印行
查看>>
Java面试题集(六)
查看>>
DCHP是什么意思
查看>>
go异常处理原则
查看>>
窗体传值
查看>>
跟我一起云计算(3)——hbase
查看>>
vim与外部文件的粘帖复制
查看>>
Entity Framework DBFirst尝试
查看>>
pojBuy Tickets2828线段树或者树状数组(队列中倒序插队)
查看>>
【BZOJ】1600: [Usaco2008 Oct]建造栅栏(dp)
查看>>
linux下启动oracle
查看>>
【原创】开源Math.NET基础数学类库使用(02)矩阵向量计算
查看>>
SqlHelper
查看>>
前端画面-下拉后滚动
查看>>
golang使用http client发起get和post请求示例
查看>>
remoting生命周期
查看>>