POP3无法在GMail上获取最新的电子邮件 [英] POP3 not fetch newest emails on GMail

查看:392
本文介绍了POP3无法在GMail上获取最新的电子邮件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用mailkit pop3来获取电子邮件,但是我发现它没有获取最新的电子邮件,并且每次运行它都返回不同的邮件数

I use mailkit pop3 to fetch emails, but I find it didn't fetch newest emails and each time I run it return different messages count number

using (Pop3Client client = new Pop3Client())
        {
            // Connect to the server
            client.Connect(hostname, port, useSsl);
            client.AuthenticationMechanisms.Remove("XOAUTH2");
            client.Authenticate((username), password);
            int messageCount = client.Count;
           // var folder = client.;

            // We want to download all messages
            List<MimeMessage> allMessages = new List<MimeMessage>(messageCount);

            for (int i = messageCount - 1; i > 0; i--)
            {
                var msg = client.GetMessage(i);
                allMessages.Add(msg);
            }
        }

我以为所有消息变量都应该填充从最新电子邮件到旧电子邮件的所有电子邮件,但是我发现所有消息都返回旧电子邮件,并且根本不包含新电子邮件,我进行了很多搜索,却没有找到原因,您知道发生这种情况的原因,我该如何解决? 我希望在这里找到任何帮助,在此先感谢

I supposed that all messages variable should be filled with all emails ordered from newest emails to old emails but I found all messages return old emails and not contains at all new emails at all, I searched a lot and didn't find the reason, Do you know why that happened and how can I fix that ? I wish to find any help here and Thanks in advance

推荐答案

您是否有机会连接到GMail?

Are you connecting to GMail, by any chance?

这是GMail行为,根据您的POP设置(在GMail网络应用的设置"页面中进行设置),它将确定客户端看到的消息.

This is a GMail behavior where, depending on your POP settings (as set in the GMail web app Settings page), will determine what messages the client sees.

这不是MailKit问题.

This is not a MailKit issue.

来自Google自己的常见问题解答在电子邮件下载不正确",其中指出:

From Google's own FAQ in the section titled "Emails aren't downloading correctly", it states:

在Gmail设置中设置POP后,您的电子邮件将可用 分批.可能需要一段时间才能看到您的所有电子邮件.

After you set up POP in your Gmail settings, your emails become available in batches. It might take a while to see all your emails.

注意:Gmail会下载您发送或接收的每封电子邮件的副本,但 用于聊天",垃圾邮件"和已删除邮件"中的电子邮件.为避免重复,Gmail不会 下载在您的邮件客户端中发送的电子邮件,但是您仍然可以看到它们 如果您登录到Gmail.

Note: Gmail downloads a copy of every email you send or receive, except for emails in Chats, Spam, and Trash. To avoid duplicates, Gmail doesn't download emails sent within your mail client, but you can still see them if you log in to Gmail.

如果您仍然无法下载电子邮件,请尝试使用最新的 模式:

If you continue to have problems downloading emails, try using recent mode:

  1. 在电子邮件客户端的POP设置页面中,找到电子邮件地址"或 用户名"字段.
  2. 添加最新消息:在您的电子邮件地址之前.例如, 最近:example@gmail.com.
  1. In your email client's POP settings page, find the "Email address" or "User name" field.
  2. Add recent: in front of your email address. For example, recent:example@gmail.com.

如果仍不能解决问题,请尝试从电子邮件客户端中删除您的Gmail地址,然后重新添加.

If that doesn't fix the problem, try deleting your Gmail address from your email client, then re-adding it.

这篇关于POP3无法在GMail上获取最新的电子邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆