You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by "sabri.bousselmi" <in...@yahoo.fr> on 2014/12/30 09:33:26 UTC

Mail-Component: HTML body is sent twice.

I'm using camel 2.13.1 version. the case is the following:Mail configuration
is pre-configured in exchange header before reaching SMTP endpoint. i did a
simple test in a separate environnement to reproduce the
issue.-----------------------------------------------------------------------------------------------------------------------in
the processor addEmailConfiguration i added "to", "from", "subject",
"contentType", and i put in the exchange body the content of the email: HTML
table(50 rows). I sent the email , the mail is recieved with no issue. Now
let's do the following: add the table content to the header exchange and
then map header table to the body before executing SMTP endpoint. As a
result we will recieve:TablecontentType: text/html TableAs can be seen, the
recieved mail content is not correct, it does not reflect the exchange body
which has been sent. similaire issue was raised and fixed  CAMEL-1727
<https://issues.apache.org/jira/browse/CAMEL-1727>   and  CAMEL-1732
<https://issues.apache.org/jira/browse/CAMEL-1732>  .Any comment
?ThanksSabri



--
View this message in context: http://camel.465427.n5.nabble.com/Mail-Component-HTML-body-is-sent-twice-tp5761124.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Mail-Component: HTML body is sent twice.

Posted by "sabri.bousselmi" <in...@yahoo.fr>.
Thanks for reply.
That's exactly what i did to solve the problem for the time being. but I am
not convinced about Mail Producer behavior, only the exchange body should be
mapped as Email content to MimeMessage.
Nothing mentioned in the documentation says that additional Headers affect
the email content --> for my point of view there is 2 cases:
1- wrong mapping at Mail producer Level when we build the MimeMessage.
2- wrong mapping at Transport level(Java-Mail API).


Regards
Sabri




--
View this message in context: http://camel.465427.n5.nabble.com/Mail-Component-HTML-body-is-sent-twice-tp5761124p5761236.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Mail-Component: HTML body is sent twice.

Posted by Reji Mathews <co...@gmail.com>.
Keep only those values in headers which u wanna allow them to pass to next
component like smtp with mapMailMessage option or pass the values even to
the next system via producer endpoints.

Else its always better practice to store them in exchange properties.

Cheers
Reji
On 01/01/2015 10:27 pm, "Jason Holmberg" <jh...@part.net> wrote:

> It has been my experience that the Mail component will try to add all
> headers
> in the headers map as email headers.  I generally remove any unnecessary
> headers from the org.apache.camel.Message before invoking the Mail
> component.
>
> -Jason
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Mail-Component-HTML-body-is-sent-twice-tp5761124p5761206.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>

Re: Mail-Component: HTML body is sent twice.

Posted by Jason Holmberg <jh...@part.net>.
It has been my experience that the Mail component will try to add all headers
in the headers map as email headers.  I generally remove any unnecessary
headers from the org.apache.camel.Message before invoking the Mail
component.

-Jason



--
View this message in context: http://camel.465427.n5.nabble.com/Mail-Component-HTML-body-is-sent-twice-tp5761124p5761206.html
Sent from the Camel - Users mailing list archive at Nabble.com.