
Untitled
By: a guest on
Jun 9th, 2012 | syntax:
None | size: 0.44 KB | hits: 30 | expires: Never
javamail mail image located on remote machine
BodyPart imagen = new MimeBodyPart();
DataSource ds=new FileDataSource("c:/image.gif");
image.setDataHandler(new DataHandler(ds));
image.setHeader("Content-ID","img");
BodyPart imagen = new MimeBodyPart();
URL url = new URL("http://server.com/mybestpicture.jpg");
URLDataSource ds = new URLDataSource(url);
image.setDataHandler(new DataHandler(ds));
image.setHeader("Content-ID", "img");