如何通过 IMAP 检索更新邮件列表
这似乎是一个简单的问题,但我还没有从 IMAP RFC 或我在 Google 上找到的任何内容中得到任何好的答案
我正在编写一个 IMAP 客户端,它每隔一段时间就会定期轮询大型邮箱分钟。
虽然使用 UIDNEXT 能够很容易地找出哪些消息是新消息,但我还想做的是跟踪其他事件,例如消息是否已读或未读,或者是否已被删除。
由于我正在进行的轮询很频繁,并且邮箱很大,因此我理想情况下希望简单地检索自上次更新以来的增量列表,而不是下载整个邮箱然后进行比较。
This seems like a straightforward question, but I haven't had any good answers from the IMAP RFC or anything I've been able to Google
I'm writing an IMAP client which periodically polls large mailboxes every few minutes.
While being able to figure out which messages are new is easy enough by using UIDNEXT, what I would also like to do is track other events such as if a message has been read or unread, or if it has been deleted.
Since the polling I am doing is frequent, and the mailboxes are large, I would ideally like to simply retrieve a list of deltas since the last update, rather than download an entire mailbox and then compare.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以保持连接打开并告诉 imap 服务器使用 IDLE 或 NOTIFY IMAP 扩展
instead of reconnecting and polling everytime you could keep the connection open and tell the imap server to push the mailbox changes using the IDLE or NOTIFY IMAP Extension