3

这个搜索查询对我来说似乎有效:

UID SEARCH OR ( OR ( OR (FROM "def@gmail.com") (FROM "abc@gmail.com")) (FROM "ghi@gmail.com")) (FROM "jkl@gmail.com")

但是在尝试将该命令查询到 Gmail IMAP 时出现“无法解析命令”错误。

我试过了

UID 搜索 OR OR OR FROM "def@gmail.com" FROM "abc@gmail.com" FROM "ghi@gmail.com" FROM "jkl@gmail.com"

UID 搜索或(来自“jkl@gmail.com”)(或(来自“ghi@gmail.com”)(或(来自“abc@gmail.com”)(来自“def@gmail.com”)))

UID 搜索 OR OR OR FROM def@gmail.com FROM abc@gmail.com FROM ghi@gmail.com FROM jkl@gmail.com

一切都因“无法解析命令”而失败。

4

1 回答 1

6

首先,确保您选择了一个邮箱,否则它将无法工作。其次,确保您在命令前加上标签,否则 IMAP 会将您的 UID 命令解释为标签,并实际执行 SEARCH 命令而不是 UID 命令。

最后,尝试慢慢构建您的搜索查询。以下命令对我有用:

tag UID SEARCH FROM "def@gmail.com"
tag UID SEARCH OR FROM "def@gmail.com" FROM "abc@gmail.com"
tag UID SEARCH OR OR FROM "def@gmail.com" FROM "abc@gmail.com" FROM "blah@hotmail.com"
tag UID SEARCH OR OR OR FROM "def@gmail.com" FROM "abc@gmail.com" FROM "blah@hotmail.com" FROM "dah@bah.com"
于 2012-11-02T13:36:30.067 回答