Hi everyone,

we are using the mail component (consumer) to poll emails and we found that 
mail-attachments without a filename are ignored. Is there any workaround to get 
attachment that don't have a name?

There is one client sending a mail containing an attachment (its of 
Content-Type: message/rfc822). For some reason, no filename is provided (see in 
the pseudo-mimemessage highlighted below). Due to missing filename, the 
attachment will not be set into the attachmentList (filename is null):
https://github.com/apache/camel/blob/main/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailBinding.java#L353

Any ideas?

Best regards,
Manuel


MimeMessage:

Content-Type: multipart/mixed;
                        
boundary="_004_AM9PR02MB74107D2A35952A65E4234BBBE8809AM9PR02MB7410eurp_"
[...]

--_004_AM9PR02MB74107D2A35952A65E4234BBBE8809AM9PR02MB7410eurp_
Content-Type: multipart/alternative;
                        
boundary="_000_AM9PR02MB74107D2A35952A65E4234BBBE8809AM9PR02MB7410eurp_"

--_000_AM9PR02MB74107D2A35952A65E4234BBBE8809AM9PR02MB7410eurp_
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

test

--_000_AM9PR02MB74107D2A35952A65E4234BBBE8809AM9PR02MB7410eurp_
Content-Type: text/html; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

[...]

--_000_AM9PR02MB74107D2A35952A65E4234BBBE8809AM9PR02MB7410eurp_--

--_004_AM9PR02MB74107D2A35952A65E4234BBBE8809AM9PR02MB7410eurp_
Content-Type: message/rfc822
Content-Disposition: attachment;
                creation-date="Wed, 06 Jul 2022 14:27:01 GMT";
                modification-date="Wed, 06 Jul 2022 14:27:01 GMT"

The attachment content

--_004_AM9PR02MB74107D2A35952A65E4234BBBE8809AM9PR02MB7410eurp_--

Reply via email to