发送包含图片的HTML邮件的正确方法:使用服务器图像还是嵌入式图像? [英] Right way to send HTML-Mails containing pictures: Use Server or Embedded images?

查看:78
本文介绍了发送包含图片的HTML邮件的正确方法:使用服务器图像还是嵌入式图像?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要....

创建一个包含多个图像(公司标头等)的html电子邮件.
图片应显示为电子邮件内容,而不是附件.

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:

  • 嵌入的图像作为附件发送(< IMGsrc ="cid:321353119 @ 02062010-119E"> )
  • 图像放置在服务器上(< 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.

第一种方法的缺点是它增加了发送消息的大小.没有人喜欢收到200KB的消息,其中包含199KB的徽标和垃圾以及1KB的实际内容...

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...

这篇关于发送包含图片的HTML邮件的正确方法:使用服务器图像还是嵌入式图像?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆