我想从我的 gmail 帐户中读取 emial。我正在使用“OpenPop.Pop3”从我的 gmail 帐户读取电子邮件,我使用以下代码:-
using OpenPop.Pop3;
public DataTable ReadEmailsFromId()
{
DataTable table = new DataTable();
try
{
using (Pop3Client client = new Pop3Client())
{
int messageCount = client.GetMessageCount();
for (int i = messageCount; i > 0; i--)
{
table.Rows.Add(client.GetMessage(i).Headers.Subject, client.GetMessage(i).Headers.DateSent);
string msdId = client.GetMessage(i).Headers.MessageId;
OpenPop.Mime.Message msg = client.GetMessage(i);
OpenPop.Mime.MessagePart plainTextPart = msg.FindFirstPlainTextVersion();
string message = plainTextPart.GetBodyAsText();
}
}
}
return table;
}
但它在 2016 年 3 月 4 日之前获取电子邮件,不获取新的/最新的电子邮件。“OpenPop.Pop3”中是否有任何限制,或者我错过了什么?