I have below java code, which pick an email from inbox and write to activeMQ queue which has Japanese Text as subject.
public class SimpleRouteBuilder extends RouteBuilder {
@Override
public void configure() throws Exception {
from("imaps://outlook.office365.com?username=*****&password=****&unseen=true&connectionTimeout=600000&mapMailMessage=truecopyTo=out")
.process(new MyProcessor())
.to("jms:queue:OUTqueue");
}
}
And in MyProcessor()
, I am retrieving
String sub = exchange.getIn().getHeader("Subject").toString();
This subject returns "=?iso-2022-jp?B?UkU6IBskQiFaJDQwTU1qIVsbKEJqYXBhbmVzZQ==?="
and not the actual Japanese Text, there is no issue with body text.
Any help how to get the Japanese text of the Subject?