I've written a mail that'll send emails with images as attachments. The images are displaying in yahoo and gmail. But hotmail is displaying a square grey box wherever there should be an image. The following is the code that builds the image. Of course I'm reffering to it in the mail using cid. Thanks a lot in advance.
l_embedImage = new MimeBodyPart();
l_dataSource = new FileDataSource(new File(l_imagesBaseDirectory + "/" + l_completeImagePath));
l_dataHandler = new DataHandler(l_dataSource);
l_embedImage.setDataHandler(l_dataHandler);
l_embedImage.setHeader("Content-ID", "<" + l_cid + ">");
l_embedImage.setHeader("Content-Type", "image/gif");
l_embedImage.setHeader("discrete-type","image");
l_embedImage.setHeader("content-transfer-encoding", "base64");
p_multipart.addBodyPart(l_embedImage);