本文介绍了骆驼邮件2.13.0 searchterm:如何从地址配置多个?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我只需要使用邮箱中来自地址x或地址y的邮件.我如何在骆驼uri中配置它?
I only have to consume mails from the mailbox which are from address x OR address y. How can i configure this in a camel uri?
我仅找到具有1个地址(searchTerm.from = x)的searchTerm配置
I've only found the searchTerm configuration with 1 address(searchTerm.from=x)
推荐答案
使用直接组件,其作用类似于方法调用
segment your route using Direct Component, it works like method call
例如:
<route>
<from uri="imap://admin@mymailserver_1"/>
<to uri="direct:processMail"/>
</route>
<route>
<from uri="imap://admin@mymailserver_2"/>
<to uri="direct:processMail"/>
</route>
<route>
<from uri="direct:processMail"/>
<to uri="bean:MailService?method=process"/>
<to uri="activemq:queue:mail.out"/>
</route>
希望这会有所帮助.
这篇关于骆驼邮件2.13.0 searchterm:如何从地址配置多个?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!