Mail Component: Mark as read and move to a different folder

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Mail Component: Mark as read and move to a different folder

Shenavai, Manuel
Hi everyone,

for the mail consumer we would like to move mails to a different folder and mark them as read. I found following configuration:


  *   camel.component.mail.configuration.delete: Deletes the messages after they have been processed. This is done by setting the DELETED flag on the mail message. If false, the SEEN flag is set instead. As of Camel 2.10 you can override this configuration option by setting a header with the key delete to determine if the mail should be deleted or not.
  *   camel.component.mail.configuration.copy-to: After processing a mail message, it can be copied to a mail folder with the given name. You can override this configuration value, with a header with the key copyTo, allowing you to copy messages to folder names configured at runtime.

Apparently this does not allow the above scenario or do I miss a setting that would help to achieve the above? If we would contribute the move+markAsRead feature, we could introduce a new setting (i.e. move-to). Would that be fine or do you propose something different?

Thanks in advance &
Best regards,
Manuel
Reply | Threaded
Open this post in threaded view
|

Re: Mail Component: Mark as read and move to a different folder

Claus Ibsen-2
Hi

Yeah that scenarios is not supported. Maybe we can add a way to mark
the copied mail as SEEN too. You are welcome to create a JIRA ticket.
And also dive into the source code to see if you can implement this.
https://camel.apache.org/manual/latest/contributing.html


On Sat, Feb 15, 2020 at 6:10 PM Shenavai, Manuel
<[hidden email]> wrote:

>
> Hi everyone,
>
> for the mail consumer we would like to move mails to a different folder and mark them as read. I found following configuration:
>
>
>   *   camel.component.mail.configuration.delete: Deletes the messages after they have been processed. This is done by setting the DELETED flag on the mail message. If false, the SEEN flag is set instead. As of Camel 2.10 you can override this configuration option by setting a header with the key delete to determine if the mail should be deleted or not.
>   *   camel.component.mail.configuration.copy-to: After processing a mail message, it can be copied to a mail folder with the given name. You can override this configuration value, with a header with the key copyTo, allowing you to copy messages to folder names configured at runtime.
>
> Apparently this does not allow the above scenario or do I miss a setting that would help to achieve the above? If we would contribute the move+markAsRead feature, we could introduce a new setting (i.e. move-to). Would that be fine or do you propose something different?
>
> Thanks in advance &
> Best regards,
> Manuel



--
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2