[ 
https://issues.apache.org/activemq/browse/CAMEL-1645?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Rohit updated CAMEL-1645:
-------------------------

    Description: 
The document at http://camel.apache.org/mail.html suggests that contentType 
header should set the Content-Type of the out going mail, but that doesn't work.

I am trying to set the content type of the mail I send using the contentType 
header. That doesn't work, but it works if I put the contentType in the 
endpoint uri. i.e. - 

            <camel:setHeader headerName="contentType"> 
                <camel:constant>text/html</camel:constant> 
            </camel:setHeader> 

Has no effect, while this works - 
             
smtp://[email protected]?password=32478hds78&contentType=text/html 

But I am not able to set the charset and it always takes us-ascii 

So for the mail the content type header comes as - 
Content-Type: text/html; charset=us-ascii

I tried using 
            <camel:setHeader headerName="contentType"> 
                <camel:constant>text/html;charset=UTF-8</camel:constant> 
            </camel:setHeader> 

and also 

            <camel:setHeader headerName="content-type"> 
                <camel:constant>text/html;charset=UTF-8</camel:constant> 
            </camel:setHeader> 

and 
smtp://[email protected]?password= 
32478hds78&contentType=text/html;charset=UTF-8 

but nothing works

  was:
The document at http://camel.apache.org/mail.html suggests that contentType 
header should set the Content-Type of the out going mail, but that doesn't work.

I am trying to set the content type of the mail I send using the contentType 
header. That doesn't work, but it works if I put the contentType in the 
endpoint uri. i.e. - 

            <camel:setHeader headerName="contentType"> 
                <camel:constant>text/html</camel:constant> 
            </camel:setHeader> 

Has no effect, while this works - 
             
smtp://[email protected]?password=3pleripple&contentType=text/html 

But I am not able to set the charset and it always takes us-ascii 

So for the mail the content type header comes as - 
Content-Type: text/html; charset=us-ascii

I tried using 
            <camel:setHeader headerName="contentType"> 
                <camel:constant>text/html;charset=UTF-8</camel:constant> 
            </camel:setHeader> 

and also 

            <camel:setHeader headerName="content-type"> 
                <camel:constant>text/html;charset=UTF-8</camel:constant> 
            </camel:setHeader> 

and 
smtp://[email protected]?password=3pleripple&contentType=text/html;charset=UTF-8
 

but nothing works


> Can't set the outgoing mail's content-type and charset
> ------------------------------------------------------
>
>                 Key: CAMEL-1645
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1645
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-mail
>    Affects Versions: 1.6.0, 2.0-M1, 1.6.1
>            Reporter: Rohit
>            Assignee: Claus Ibsen
>             Fix For: 1.6.2, 2.0.0
>
>
> The document at http://camel.apache.org/mail.html suggests that contentType 
> header should set the Content-Type of the out going mail, but that doesn't 
> work.
> I am trying to set the content type of the mail I send using the contentType 
> header. That doesn't work, but it works if I put the contentType in the 
> endpoint uri. i.e. - 
>             <camel:setHeader headerName="contentType"> 
>                 <camel:constant>text/html</camel:constant> 
>             </camel:setHeader> 
> Has no effect, while this works - 
>              
> smtp://[email protected]?password=32478hds78&contentType=text/html 
> But I am not able to set the charset and it always takes us-ascii 
> So for the mail the content type header comes as - 
> Content-Type: text/html; charset=us-ascii
> I tried using 
>             <camel:setHeader headerName="contentType"> 
>                 <camel:constant>text/html;charset=UTF-8</camel:constant> 
>             </camel:setHeader> 
> and also 
>             <camel:setHeader headerName="content-type"> 
>                 <camel:constant>text/html;charset=UTF-8</camel:constant> 
>             </camel:setHeader> 
> and 
> smtp://[email protected]?password= 
> 32478hds78&contentType=text/html;charset=UTF-8 
> but nothing works

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to