You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Jörn Kottmann <ko...@gmail.com> on 2009/06/16 10:06:53 UTC

Camel Mail: Alternate body is included twice

Hello,

the camel mail component has a feature to send a mail
in text/plain and text/html. To do that the text/html content
is placed in the message body, the text/plain content
in the header mail_alternateBody (camel 1.6.1) and the message is
send via smtp with the content type set to text/html.

The message is displayed as expected in a mail reader
but contains also the mail_alternateBody header field with
the text/plain part, which means that the text/plain part
is included twice in the mail once mime encoded and once in
the mail header.

Is there a way to remove the mail_alternateBody header ?

Thanks,
Jörn

Re: Camel Mail: Alternate body is included twice

Posted by Claus Ibsen <cl...@gmail.com>.
Hi
I have created a ticket to track this
https://issues.apache.org/activemq/browse/CAMEL-1727

And I have committed a fix, should be in next release 1.6.2 and 2.0.

You can try out a SNAPSHOT of the 1.6.2 to see if it works for you.
Details here
http://camel.apache.org/download.html

Could take 4+ hours or more before the apache servers have build a new
snapshot with the fix.



On Tue, Jun 16, 2009 at 1:07 PM, Claus Ibsen <cl...@gmail.com> wrote:

> Hi
>
> Thanks for reporting.
>
> On Tue, Jun 16, 2009 at 10:06 AM, Jörn Kottmann<ko...@gmail.com> wrote:
> > Hello,
> >
> > the camel mail component has a feature to send a mail
> > in text/plain and text/html. To do that the text/html content
> > is placed in the message body, the text/plain content
> > in the header mail_alternateBody (camel 1.6.1) and the message is
> > send via smtp with the content type set to text/html.
> >
> > The message is displayed as expected in a mail reader
> > but contains also the mail_alternateBody header field with
> > the text/plain part, which means that the text/plain part
> > is included twice in the mail once mime encoded and once in
> > the mail header.
> >
> > Is there a way to remove the mail_alternateBody header ?
> Ah that is a pita. Does the mail reader really do this, as
> mail_alternateBody is a Camel constant and as far as I know not a well
> known
> email header.
>
> I am afraid you cannot easily remove this header as you want to use it
> to provide the alternative mail? And its needed in Camel 1.6.1
> to generate the alternative mail.
>
> But it would be cool if you would like to download the source, fix the
> issue by removing the mail_alternativeBody header and recompile and
> build a camel-mail-1.6.x.jar you can use to test with. And report back
> your findings.
>
> And you could then submit a patch so we can get it fixed in the Apache
> code as well.
>
> Here is a link how to build the camel code
> http://camel.apache.org/building.html
>
>
>
> >
> > Thanks,
> > Jörn
> >
>
>
>
> --
> Claus Ibsen
> Apache Camel Committer
>
> Open Source Integration: http://fusesource.com
> Blog: http://davsclaus.blogspot.com/
> Twitter: http://twitter.com/davsclaus
>



-- 
Claus Ibsen
Apache Camel Committer

Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus

Re: Camel Mail: Alternate body is included twice

Posted by Jörn Kottmann <ko...@gmail.com>.
Claus Ibsen wrote:
> Hi
> Cool. I believe I have fixed it already. See other mails in this mail
> thread.
>
>   
Sorry did not see that mail, thanks :-)

Jörn

Re: Camel Mail: Alternate body is included twice

Posted by Claus Ibsen <cl...@gmail.com>.
Hi
Cool. I believe I have fixed it already. See other mails in this mail
thread.


On Thu, Jun 18, 2009 at 11:39 AM, Jörn Kottmann <ko...@gmail.com> wrote:

> Claus Ibsen wrote:
>
>> Hi
>>
>> Thanks for reporting.
>>
>> On Tue, Jun 16, 2009 at 10:06 AM, Jörn Kottmann<ko...@gmail.com>
>> wrote:
>>
>>
>>> Hello,
>>>
>>> the camel mail component has a feature to send a mail
>>> in text/plain and text/html. To do that the text/html content
>>> is placed in the message body, the text/plain content
>>> in the header mail_alternateBody (camel 1.6.1) and the message is
>>> send via smtp with the content type set to text/html.
>>>
>>> The message is displayed as expected in a mail reader
>>> but contains also the mail_alternateBody header field with
>>> the text/plain part, which means that the text/plain part
>>> is included twice in the mail once mime encoded and once in
>>> the mail header.
>>>
>>> Is there a way to remove the mail_alternateBody header ?
>>>
>>>
>> Ah that is a pita. Does the mail reader really do this, as
>> mail_alternateBody is a Camel constant and as far as I know not a well
>> known
>> email header.
>>
>> I am afraid you cannot easily remove this header as you want to use it
>> to provide the alternative mail? And its needed in Camel 1.6.1
>> to generate the alternative mail.
>>
>> But it would be cool if you would like to download the source, fix the
>> issue by removing the mail_alternativeBody header and recompile and
>> build a camel-mail-1.6.x.jar you can use to test with. And report back
>> your findings.
>>
>> And you could then submit a patch so we can get it fixed in the Apache
>> code as well.
>>
>> Here is a link how to build the camel code
>> http://camel.apache.org/building.html
>>
>>
> Ok, here is the jira issue:
> https://issues.apache.org/activemq/browse/CAMEL-1732
>
> Also tested with 2.0-M2 and it shows a similar behavior,
> though the name of the constant is different.
>
> Jörn
>



-- 
Claus Ibsen
Apache Camel Committer

Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus

Re: Camel Mail: Alternate body is included twice

Posted by Jörn Kottmann <ko...@gmail.com>.
Claus Ibsen wrote:
> Hi
>
> Thanks for reporting.
>
> On Tue, Jun 16, 2009 at 10:06 AM, Jörn Kottmann<ko...@gmail.com> wrote:
>   
>> Hello,
>>
>> the camel mail component has a feature to send a mail
>> in text/plain and text/html. To do that the text/html content
>> is placed in the message body, the text/plain content
>> in the header mail_alternateBody (camel 1.6.1) and the message is
>> send via smtp with the content type set to text/html.
>>
>> The message is displayed as expected in a mail reader
>> but contains also the mail_alternateBody header field with
>> the text/plain part, which means that the text/plain part
>> is included twice in the mail once mime encoded and once in
>> the mail header.
>>
>> Is there a way to remove the mail_alternateBody header ?
>>     
> Ah that is a pita. Does the mail reader really do this, as
> mail_alternateBody is a Camel constant and as far as I know not a well
> known
> email header.
>
> I am afraid you cannot easily remove this header as you want to use it
> to provide the alternative mail? And its needed in Camel 1.6.1
> to generate the alternative mail.
>
> But it would be cool if you would like to download the source, fix the
> issue by removing the mail_alternativeBody header and recompile and
> build a camel-mail-1.6.x.jar you can use to test with. And report back
> your findings.
>
> And you could then submit a patch so we can get it fixed in the Apache
> code as well.
>
> Here is a link how to build the camel code
> http://camel.apache.org/building.html
>   
Ok, here is the jira issue:
https://issues.apache.org/activemq/browse/CAMEL-1732

Also tested with 2.0-M2 and it shows a similar behavior,
though the name of the constant is different.

Jörn

Re: Camel Mail: Alternate body is included twice

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

Thanks for reporting.

On Tue, Jun 16, 2009 at 10:06 AM, Jörn Kottmann<ko...@gmail.com> wrote:
> Hello,
>
> the camel mail component has a feature to send a mail
> in text/plain and text/html. To do that the text/html content
> is placed in the message body, the text/plain content
> in the header mail_alternateBody (camel 1.6.1) and the message is
> send via smtp with the content type set to text/html.
>
> The message is displayed as expected in a mail reader
> but contains also the mail_alternateBody header field with
> the text/plain part, which means that the text/plain part
> is included twice in the mail once mime encoded and once in
> the mail header.
>
> Is there a way to remove the mail_alternateBody header ?
Ah that is a pita. Does the mail reader really do this, as
mail_alternateBody is a Camel constant and as far as I know not a well
known
email header.

I am afraid you cannot easily remove this header as you want to use it
to provide the alternative mail? And its needed in Camel 1.6.1
to generate the alternative mail.

But it would be cool if you would like to download the source, fix the
issue by removing the mail_alternativeBody header and recompile and
build a camel-mail-1.6.x.jar you can use to test with. And report back
your findings.

And you could then submit a patch so we can get it fixed in the Apache
code as well.

Here is a link how to build the camel code
http://camel.apache.org/building.html



>
> Thanks,
> Jörn
>



-- 
Claus Ibsen
Apache Camel Committer

Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus