骆驼式过滤自动回复邮件 [英] Camel route to filter out the auto response emails

查看:33
本文介绍了骆驼式过滤自动回复邮件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用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.com?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:

  1. searchTerm.unseen - 是否仅限制不可见邮件
  2. searchTerm.subjectOrBody - 按主题或正文限制以包含该词.
  3. searchTerm.subject - 主题必须包含单词.
  4. searchTerm.body - 正文必须包含单词.
  5. searchTerm.from - 邮件必须来自给定的电子邮件模式.
  6. searchTerm.to - 邮件必须采用给定的电子邮件模式.
  7. searchTerm.fromSentDate/toSentDate - 按发送日期过滤

可以在此处找到更多文档 - http://camel.apache.org/mail.html

Further documentation can be found here - http://camel.apache.org/mail.html

这篇关于骆驼式过滤自动回复邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆