问题描述
限时送ChatGPT账号..我正在使用camel rout 来使用收件箱文件夹中的电子邮件.但我想过滤掉自动回复的电子邮件,例如不在办公室等.
I am using camel rout to consume the emails from my inbox folder. But I want to filter out the auto responded emails like out of offices etc.
我看到有一个选项可以通过使用选项 unseen=true
来仅处理未读邮件.
I see there is a option for to process only unread messages by using option unseen=true
.
我用来使用电子邮件的 URI 如下所示:
The URI that I am using to consume the emails looks like:
pop3://username@host?password=password;delete=true&unseen=true&consumer.delay=60000
推荐答案
我认为您正在寻找的是要添加到端点 URI 的 searchTerm
属性.
I think what you're looking for is the searchTerm
property to add to your endpoint URI.
如果您想过滤掉包含 Out Of Office 一词的电子邮件,您的端点 URI 可能如下所示:
If you want to filter out e-mails with the term Out Of Office in them, your endpoint URI might look like this:
pop3://username@host?password=password;delete=true&searchTerm.subjectOrBody=Out+Of+Office&searchTerm.unseen=true
searchTerm 属性让您可以根据下面提到的其他几个条件进行搜索:
The searchTerm property lets you search on the basis of several other criteria as mentioned below:
searchTerm.unseen - 是否仅限制不可见邮件searchTerm.subjectOrBody - 按主题或正文限制以包含该词.searchTerm.subject - 主题必须包含单词.searchTerm.body - 正文必须包含单词.searchTerm.from - 邮件必须来自给定的电子邮件模式.searchTerm.to - 邮件必须采用给定的电子邮件模式.searchTerm.fromSentDate/toSentDate - 按发送日期过滤可以在此处找到更多文档 - http://camel.apache/mail.html一个>
Further documentation can be found here - http://camel.apache/mail.html
这篇关于骆驼式过滤自动回复邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
更多推荐
[db:关键词]
发布评论