Hi Mattias,
You don't need to encoding the subject yourself, you just need to set
the charset name on the exchange, then camel-mail will take care of it.
Did you try out this code to send the subject ?
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
Mattias Severson wrote:
Yes, I also read about the US-ASCII encoding.
Consequently, I tried to use
http://java.sun.com/products/javamail/javadocs/javax/mail/internet/MimeUtility.html#encodeText%28java.lang.String,%20java.lang.String,%20java.lang.String%29
MimeUtility.encodeText(...) with "B" encoding to base 64 encode the
message. The message is encoded, but the recipients are unable to decode it.
/Mattias