Hello,
One week ago, i previously tried the question here. Now i have more
infos...
Sample code and explanations :
https://stackoverflow.com/questions/73948864/camel-frommail-loose-headers
Short version :
Sample Route
from("imap://server?username=aaa&password=bbb©To=out&delete=true&unseen=false&folderName=in&mapMailMessage=false")
.setHeader("copyTo", simple("works"))
.bean(MyTest.class, "hardcodeJson")
.unmarshal(new JacksonDataFormat(Reply.class))
.log("copyTo=${header[copyTo]}")
The problem : in console, i see in .log() that the content of the
header[copyTo] is lost.
if i comment the .unmarshall(), it's OK
If i replace the from("imap") with a from('direct') in an unit test,
it's OK.
Can someone explain me why ?
Is it a bug ?
Thanks in advance...