IMAP 获取所选文件夹的 UID 列表

发布于 2024-10-17 09:41:33 字数 168 浏览 5 评论 0原文

如何从所选文件夹中检索 IMAP UID 列表?我想获取邮件 UID 列表,因此我传递了 1150 UID FETCH FLAGS (\Seen \Flagged),但我无法检索该列表:它给了我一个类似 <代码>错误命令。那么如何从所选文件夹中检索 UID 列表呢?

How can I retrieve the list of IMAP UIDs from the selected folder? I want to get the list of mail UIDs, so I am passing the 1150 UID FETCH FLAGS (\Seen \Flagged), but I am not able to retrieve the list: it gives me an error like BAD Command. So how I can retrieve the list of UID from the selected folder?

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

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

发布评论

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

评论(1

迎风吟唱 2024-10-24 09:41:33

列出当前所选文件夹中所有 UID 的最简单(也是最紧凑)的方法是通过 UID SEARCH ALL :

A001 UID SEARCH ALL
* SEARCH 288 291 292 293 295 323 324 325 326 327 385 387 472 474 641 720 748
A001 OK UID SEARCH completed

您的 UID FETCH 请求中的错误遗漏了序列集并包括标志列表。如果你将其重写为

A002 UID FETCH 1:* (UID)

or

A002 UID FETCH 1:* (UID FLAGS)

它将起作用。

The easiest (and most compact) way to list all the UIDs in the currently-selected folder is via UID SEARCH ALL:

A001 UID SEARCH ALL
* SEARCH 288 291 292 293 295 323 324 325 326 327 385 387 472 474 641 720 748
A001 OK UID SEARCH completed

The errors in your UID FETCH request were leaving out the sequence-set and including a list of flags. If you rewrote it as

A002 UID FETCH 1:* (UID)

or

A002 UID FETCH 1:* (UID FLAGS)

it would work.

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