Thanks
it's working fine, with this code
public void process(Exchange ex) throws Exception {
{
String fileNameWritten = (String) ex.getIn().getHeader(
"CamelFilePath", String.class);
String fileName = (String) ex.getIn().getHeader(
Exchange.FILE_NAME_ONLY, String.class);
ex.getIn().setBody(fileName);
ex.getIn().addAttachment(fileName,
new DataHandler((new
FileDataSource(fileNameWritten))));
}
--
View this message in context:
http://camel.465427.n5.nabble.com/SMTP-sending-file-binary-as-attachment-corrupted-tp5543701p5545931.html
Sent from the Camel - Users mailing list archive at Nabble.com.