camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tide08 <sachin2...@yahoo.com>
Subject unicode characters broken with attachments?
Date Wed, 02 Sep 2009 23:04:33 GMT

I am using camel 1.6.1 and I have simple route, something like below:

<camel:route>
            <camel:from uri="direct:send"/>
            <camel:to uri="velocity:someTemplate.vm" />
            <camel:to uri="smtp://mail.mycompany.com"/>
</camel:route>

Problem is that when the message is sent with an attachment unicode
characters are broken and do not render correctly in mail client. If I send
the same message with NO attachments everything looks fine. So looks like
for unicode charcters to work with multipart it needs something different?

Here is my template like:
<html>
	<head>Dear ${lastName}, ${firstName}</head>
	<body>
		Thanks for the order of ${item}.<br/><br/>Regards,<br/> ${footer}<br/>
	</body>
</html>

Here is the message like:

body.put("firstName", "Garr");
body.put("item", "sportwagons and geeks");
body.put("lastName", "Tuumas");
body.put("footer", "\u00A9 Camel Riders Bookstore"); //Copyright symbol

I used same message body and sent 2 different messages, one with attachment
and other one with no attachemnts. Velocity endpoint seems to process it
correctly in both the cases and body looks correct. But when it gets
displayed in mail client, the one with attachment is broken. 

Content-Type and Content-Transfer-Encoding for body part looks exactly same
in both scenario. Not sure if I need to do something special for multipart
or Is it bug in camel?

Thanks!
-- 
View this message in context: http://www.nabble.com/unicode-characters-broken-with-attachments--tp25267105p25267105.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Mime
View raw message