camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rrapozo <rrap...@moredata.pt>
Subject Camel Mail - It's possible "attach" image in body with camel
Date Thu, 05 Feb 2015 15:46:43 GMT
With the below I can put a image in the mail body

Multipart multipart = new MimeMultipart();

BodyPart htmlPart = new MimeBodyPart();
htmlPart.setContent(content, "text/html; charset=UTF-8");

BodyPart imagePart = new MimeBodyPart();
DataSource fds = new FileDataSource(pathImage);
imagePart.setDataHandler(new DataHandler(fds));
imagePart.setHeader("Content-ID", "<image>");

multipart.addBodyPart(htmlPart);
multipart.addBodyPart(imagePart);

I want make the same thing just with camel like :

exchange.getIn().setBody(body); //Here I think that have a way to put my
image in the body of mail.

Regards 

Rodrigo Rapozo



--
View this message in context: http://camel.465427.n5.nabble.com/Camel-Mail-It-s-possible-attach-image-in-body-with-camel-tp5762430.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message