camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rohitbrai <rohitb...@gmail.com>
Subject Set charset to utf-8 for sending emails using smtp endpoint
Date Mon, 25 May 2009 08:17:00 GMT

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://rohitr@xyzab.pramati.com?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://rohitr@xyzab.pramati.com?password=3pleRipple&contentType=text/html;charset=UTF-8

but nothing works :(
Any idea what's wrong here???

Regards,
Rohit
-- 
View this message in context: http://www.nabble.com/Set-charset-to-utf-8-for-sending-emails-using-smtp-endpoint-tp23703094p23703094.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Mime
View raw message