Chilkat:如何检查对给定电子邮件的回复 - Original-Envelope-Id

问题描述

我有来自我发送的电子邮件的 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

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

解决方法

Chilkat 将搜索条件字符串未经修改地传递给 IMAP 服务器。因此,这实际上只是理解 IMAP 搜索条件规范的问题,如此处 RFC 3501 中所述:https://tools.ietf.org/html/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 服务器实现并没有实现所有可能的 SEARCH 条件选项。