[
https://issues.apache.org/jira/browse/CAMEL-1069?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13477694#comment-13477694
]
Claus Ibsen commented on CAMEL-1069:
------------------------------------
The idea would roughly be to add a getter/setter on the mail configuration for
a
{code}
private SearchTerm filter;
{code}
Then end users can implement this class, and configure it on the mail component
/ endpoint. If directly in endpoint you do
{code}
from("imap:xxxx?filter=#myFilter")
...
{code}
Then in the mail consumer, you would need to grab the filter and apply it to
the Java Mail API that does the mail scanning.
> camel-mail - add option for searchterm
> --------------------------------------
>
> Key: CAMEL-1069
> URL: https://issues.apache.org/jira/browse/CAMEL-1069
> Project: Camel
> Issue Type: New Feature
> Components: camel-mail
> Reporter: Claus Ibsen
> Priority: Minor
> Fix For: 2.11.0
>
>
> The mail API has SearchTerm to allow filtering a mail folder when consuming.
> We should allow options/configuration to set a reference to a class
> implementing javax.mail.search.SearchTerm so end users can code their own
> filter how to filer mails.
> We could consider adding some kind of expression support for the most common
> SearchTerm:
> - subject
> - from
> - to
> - body
> - flags
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira