camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Petteri <>
Subject Camel Mail Component doesn't handle multiple attachments with same file name properly
Date Fri, 02 Dec 2016 09:16:34 GMT

I'm using Apache Camel and its mail component to read emails and their 

I have encountered a problem which occurs when handling mails with 
multiple attachments using the same file name.

It seems that the problem is caused by the use of Map<String, 
DataHandler> type in org.apache.camel.component.mail.MailBinding. 
Attachments are looped and checked against this map. If the map already 
contains a key with the same file name, attachment is skipped:

Maybe this key value could be somehow incremented so the map could 
contain all attachments despite of their file names?

I'm using Camel version 2.10.7 but the code seems to be unchanged by 
this part in current version too.

This kind of mails are regularly coming from end users of our software 
and there's no easy way to circumvent this from our side.


View raw message