0

我有来自我发送的电子邮件的 MESSAGE-ID。如何将 IMAP“所有邮箱”中的电子邮件过滤为响应我的 MESSAGE-ID 的罚款电子邮件。目前我知道作为回应,我需要寻找“Original-Envelope-Id”。

但是如何用 Chilkat 做到这一点?

我需要使用 $imap.Search(....) https://www.chilkatsoft.com/refdoc/csImapRef.html#method70 吗?

和:

  UID 
     Messages with unique identifiers corresponding to the specified
     unique identifier set.  Sequence set ranges are permitted.

?

顺便提一句。 我已经检查了这个例子 https://www.example-code.com/powershell/imap_search.asp

但他与搜索电子邮件无关。

4

1 回答 1

1

Chilkat 未修改地将搜索条件字符串传递给 IMAP 服务器。因此,这实际上只是理解搜索条件的 IMAP 规范的问题,如 RFC 3501 中所述: https ://www.rfc-editor.org/rfc/rfc3501#section-6.4.4

如果您查看 RFC,这是指定搜索特定标头字段的方法:

  HEADER <field-name> <string>
     Messages that have a header with the specified field-name (as
     defined in [RFC-2822]) and that contains the specified string
     in the text of the header (what comes after the colon).  If the
     string to search is zero-length, this matches all messages that
     have a header line with the specified field-name regardless of
     the contents.

但是.. 我的经验是大多数 IMAP 服务器实现并没有实现所有可能的搜索条件选项。

于 2020-12-30T16:26:17.257 回答