I created a new route which I added to my camel context:
from("direct:send").setProperty(Exchange.CHARSET_NAME, new
ConstantExpression("ISO-8859-1")).to("smtp://myserver");
And then I updated the producer template:
producerTemplate.sendBodyAndHeaders("direct:send", body, camelEmailHeader);
The actual recipient address is specified in the camelEmailHeader.get("to")
The mail I send has the subject "Subject åäö ÅÄÖ" and the body "Body åäö
ÅÄÖ"
There are still some problems, depending on which email client I use.
Gmail:
The subject is displayed as "Subject: едц ЕДЦ"
The body is displayed correctly
Thunderbird:
In the email list, the subject is displayed as "Subject: ??? ???"
In the email itself, the subject displayed correctly
The body is displayed as "Body åäö ÅÄÖ"
Apple mail:
Both the subject and the body are displayed correctly
--
View this message in context:
http://camel.465427.n5.nabble.com/Email-character-encoding-tp510814p511616.html
Sent from the Camel - Users mailing list archive at Nabble.com.