Emailing Images

I wrote a letter that will send letters with images as attachments. Images are displayed in yahoo and gmail. But hotmail displays a square gray square wherever there is an image. Below is the code that creates the image. Of course, I repeat this in the mail using cid. Thank you very much 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);
+3
source share
2 answers

I was having problems delivering email messages until I went through the steps to become a reliable mail server.

4 ( " : (SPF)" URL-: http://postmaster.msn.com/Guidelines.aspx

+2

, hotmail , :

, .

, Microsoft ;)

0

Source: https://habr.com/ru/post/1729947/


All Articles