camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nono <yan.w...@db-is.com>
Subject hwo to embed image in email
Date Tue, 07 Jan 2014 15:58:43 GMT
Below is example of my code , i want to embed logo.gif into email body.it
does not work, it only attached logo as a file in emailCould anyone give me
some hints? Thanks!class EmailProcessor implements Processor {    @Override   
public void process(Exchange exchange) throws Exception {       
//exchange.getIn().setHeader("contentType", "image/gif");       
exchange.getIn().addAttachment("test_logic name.pdf", new DataHandler(new
FileDataSource("target/test-classes/test xxxx.pdf")));       
exchange.getIn().addAttachment("logo.gif", new DataHandler(new
FileDataSource("target/test-classes/logo.gif")));    }}



--
View this message in context: http://camel.465427.n5.nabble.com/hwo-to-embed-image-in-email-tp5745681.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message