Dry*_*ods 4 c# asp.net openpop
使用OpenPop连接到Gmail时,我只能检索一次电子邮件,即使我不删除它也是如此.使用GetMessageCount()我总是收到0封电子邮件.我怎样才能收到那里的所有电子邮件?
只有在阅读并处理它们之后,我才能下令删除.我使用以下代码来获取电子邮件:
using (var client = new Pop3Client())
{
// Connect to the server
client.Connect(serverData.Hostname, serverData.Port, serverData.UseSsl);
// Authenticate ourselves towards the server
client.Authenticate(serverData.Username, serverData.Password, AuthenticationMethod.UsernameAndPassword);
var emailAmount = client.GetMessageSizes().Count;
// Fetch all the current uids seen
var msgCount = client.GetMessageCount();
.....
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
4513 次 |
| 最近记录: |