[ 
https://issues.apache.org/jira/browse/CAMEL-18517?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17605852#comment-17605852
 ] 

Jeff commented on CAMEL-18517:
------------------------------

Ok, if I can find the time I might do that. For anyone else that is interested, 
the MailBinding class calls the `populateContentOnBodyPart` method which 
converts the message body to a String.  This delegates to the 
MailConverters.java class which selects the first body part that has a 
Content-Type starting with 'text' and converts that body part to a String. So 
only the first 'text' body part is included, all others are lost.

> Camel mail multipart messages do not include all body parts
> -----------------------------------------------------------
>
>                 Key: CAMEL-18517
>                 URL: https://issues.apache.org/jira/browse/CAMEL-18517
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-mail
>    Affects Versions: 3.18.2
>            Reporter: Jeff
>            Priority: Minor
>             Fix For: 3.x
>
>
> Camel mail does not include all MIME body parts in multipart messages. In the 
> unit test linked below, the `htmlPart` body part is not contained in the body 
> parts of the deserialized message. This test can easily be broken by simply 
> changing the order that the MIME body parts are added to the multipart 
> message in the `populateMimeMessageBody` method.
> [https://github.com/apache/camel/blob/main/components/camel-mail/src/test/java/org/apache/camel/component/mail/MimeMessageConsumeTest.java]
> Users expect to be able to send multipart emails which contain both plain 
> text and html parts (multipart/alternative) so that the users email clients 
> can display it appropriately. This is not possible with Camel, since only one 
> of the two alternative body parts is deserialized.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to