如何使用 IMAP 搜索未在给定 MessageUId 中列出的电子邮件?

发布于 2024-08-21 09:07:50 字数 370 浏览 4 评论 0原文

我正在使用 http://ruby-doc.org/ stdlib/libdoc/net/imap/rdoc/index.html 访问 gmail。

我可以搜索带有特定标签的电子邮件,但我试图避免搜索电子邮件两次。

因此,为了做到这一点,我认为我可以存储每封电子邮件的 message_id,以便在下次搜索时我会冷藏该 message_id 以避免搜索该电子邮件。

您知道如何搜索不属于给定电子邮件 message_id 列表的电子邮件吗?

非常感谢您抽出时间!

I'm using http://ruby-doc.org/stdlib/libdoc/net/imap/rdoc/index.html to access gmail.

I can search for emails with a particular label, but I'm trying to avoid to search an email twice.

So in order to do that, I thought that I could store the message_id of each email so that in the next searches I would reefer to that message_id to avoid searching for that email.

Do you know how can I do to search emails that are not part of a given email message_id list?

Thanks a lot for your time!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

毁我热情 2024-08-28 09:07:50

与其存储消息 ID,为什么不直接在某个消息日期(这将是您上次搜索的日期)之后进行搜索呢?

Rather than storing message ids, why don't you just search after a certain message date (which would be the date of your last search)?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文