Camel mail 2.13.0 searchterm: How to configure multiple from addresses?

核能气质少年 提交于 2019-12-24 07:47:12

问题


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?

I've only found the searchTerm configuration with 1 address(searchTerm.from=x)


回答1:


segment your route using Direct Component, it works like method call

for example:

<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>    

Hope this helps.



来源:https://stackoverflow.com/questions/42766810/camel-mail-2-13-0-searchterm-how-to-configure-multiple-from-addresses

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!