如何在 Node-RED 中为 node-red-node-email 指定标准

How to specify criteria for node-red-node-email in Node-RED

我想使用 Node-RED 中的 node-red-node-email 节点在我的收件箱中搜索特定电子邮件。

帮助说我应该在msg.criteria中指定条件:

Uses the node-imap module - see that page for information on the msg.criteria format if needed.

引用的文档页面解释了什么放在那里但没有如何去做。

由于 node-red-node-email 节点是原始 (?) 节点,因此没有有效负载(即 msg 对象)传递给它。也无法为标准指定不同的对象(例如 flow. 变量)。

如何指定 msg.criteria(或更一般地说,如何指定搜索条件)以便 node-red-node-email 使用它?

将配置顶部的 "Get Mail" 条目从 "automatically" 更改为 "when triggered",电子邮件节点将获得一个输入端口。

然后您可以使用它来触发节点检查新邮件并添加 msg.criteria