开发者

Right way to send HTML-Mails containing pictures: Use Server or Embedded images?

开发者 https://www.devze.com 2023-01-02 15:23 出处:网络
I want to .... create a html-email containing several images (company header, etc). The images shall be displayed as email content, not as an attachement.

I want to ....

create a html-email containing several images (company header, etc).

The images shall be displayed as email content, not as an attachement.

So how is the best way to do this?

I'm aware of two possibilities:

  • embedded images send as attachment (<IMG src="cid:321353119@02062010-119E">)
  • images are placed on the server (<img src="http://myserver.com/mypicture.gif">)
  • 开发者_开发技巧


Many mail clients will block access to external images (your second method) by default. However, most will display the images in your first method without blocking.

The reason for this is that you can use the fact that the mail client accessed the server to download the external images as a way of "tracking" whether the email was opened and therefore viewed by the user - it's a privacy concern. There is no such issue with attached images.

The downside of your first method is that it increases the size of the messages you send. Nobody likes to receive a 200KB message with 199KB of logos and junk and 1KB of actual content...


Images on your server -

  • Saves storage on mail servers
  • Decreased bandwidth for you to send
  • Keeps the download smaller for the end-user
  • Gives you control over the images post-send
0

精彩评论

暂无评论...
验证码 换一张
取 消