This content has been marked as final.
Show 1 reply
-
1. Re: how to send file as email attachment via
yanwang Dec 17, 2013 11:15 AM (in response to yanwang)it works...
template.send("", ExchangePattern.InOnly, new EmailProcessor());
class EmailProcessor implements Processor {
@Override
public void process(Exchange exchange) throws Exception {
exchange.getIn().setBody("Camel rocks - TEST Please Ingore!!!");
exchange.getIn().addAttachment("test.pdf", new DataHandler(new FileDataSource("target/test-classes/test xxxx.pdf")));
}
}