按多个科目IMAPX过滤

时间:2017-11-02 15:33:53

标签: c# imap imapx

有没有办法过滤邮件'由多个特定主题下载?

例如,我只需要下载包含" for 10"的消息。或者"对于11"在各自的科目中。

有一个主题很清楚:

folderSearchMessages.Messages.Download("SUBJECT for 10", messageFetchMode, numMessages)

顺便问一下,我在哪里可以找到更深入的文档?而不是官方页面。

1 个答案:

答案 0 :(得分:1)

Not an IMAPX user, but if it's free form text in the search string, you can just use the IMAP search language, detailed in RFC3501 §6.4.4. If your server supports search correctly (there are a lot that don't), you can use an OR term:

folderSearchMessages.Messages.Download("OR (SUBJECT \"for 10\") (SUBJECT \"for 11\")", messageFetchMode, numMessages)

Note that you should also quote your strings.