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

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

问题描述

我正在使用骆驼溃败来消耗我的收件箱文件夹中的电子邮件. 但是我想过滤掉办公室外等自动回复的电子邮件.

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.

如果您想过滤掉其中带有不在办公室一词的电子邮件,则端点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天全站免登陆