apache-camel-mail

How to addAttachment on Camel 3.0

老子叫甜甜 提交于 2020-04-12 07:10:47
问题 in Camel 2.x I could add an Attachment to a Message like: exchange.getOut().addAttachment("LogFile.log.gz", new DataHandler(Base64.decodeBase64(FileContentBase64),"application/x-gzip")); But in Camel 3.0 it is not possible. I change my code like the migration guide says: exchange.getMessage().addAttachment("LogFile.log.gz", new DataHandler(Base64.decodeBase64(FileContentBase64),"application/x-gzip")); But it is not working. Also this not: exchange.getIn().addAttachment("LogFile.log.gz", new