Mattias Severson wrote:
Hi,

I am having trouble sending ISO-8859-1 characters, e.g. åäö, in emails. I
have tried to set the defaultEncoding option of the http://camel.apache.org/mail.html Camel Mail component to ISO-8859-1, but that did not solve the problem.
The sender is implemented as

producerTemplate.sendBodyAndHeaders(emailRecipientUri, emailBody,
camelEmailHeaders);

Maybe you need to set the Exchange.property for the charset like this

producerTemplate.send(emailRecipientUri, new Processor() {
   void process(Exchange exchange) throws Exception {
       exchange.getIn().setBody(emailBody);
       exchange.getIn().setHeaders(camelEmailHeaders);
       exchange.setProperty(Exchange.CHARSET_NAME, "ISO-8859-1");
   }
}

Willem
----------------------------------
Apache Camel, Apache CXF committer
Open SOA http://www.fusesource.com
Blog http://willemjiang.blogspot.com
Tiwtter http://twitter.com/willemjiang

and I am using Camel 2.3.0


Any ideas?

/Mattias





Reply via email to