邮件中发送图片,是作为附件还是插入一个 HTML img tag 好

有一种折中的方法:把图片作为附件发送,然后把它嵌入text/html中。RFC 2111 - Content-ID and Message-ID Uniform Resource Locators (RFC2111) The use of within email to convey Web pages and their associated images requires a URL scheme to permit the HTML to refer to the images or other data included in the message. The Content-ID Uniform Resource Locator, "cid:", serves that purpose. Similarly Net News readers use Message-IDs to link related messages together. The Message-ID URL provides a scheme, "mid:", to refer to such messages as a "resource". The "mid" (Message-ID) and "cid" (Content-ID) URL schemes provide identifiers for messages and their body parts. The "mid" scheme uses (a part of) the message-id of an email message to refer to a specific message. The "cid" scheme refers to a specific body part of a message; its use is generally limited to references to other body parts in the same message as the referring body part. The "mid" scheme may also refer to a specific body part within a designated message, by including the content-ID\u0026#39;s address.
■网友
为了降低安全风险,一般我都是禁用 img 标签的。嗯。如果不怕 XSS 那么当然可以载图片。但是海报什么的,就没必要直接邮件形式了吧。邮件简要介绍一下内容,并附上链接就好了。
■网友
使用 \u0026lt;img\u0026gt; 标签我认为是最不合适的。你希望每一个 app 都是 monstor app,还是希望它们各自 do one thing, and do one thing good? 你有什么样的习惯,就会得到什么样的软件。有些事情最好交给系统来做。比如 preview image 这件事情,最好每个 app 都提供给 Finder 合适的 quick-view plug-in。比如文件同步这件事情,就让 Finder 当界面就好。OS 的发展是让 app 间的协作越来越方便。Image viewer 和 HTML browser 的事情不用交给 email reader 处理。
■网友
这是一个好问题,当群发邮件的时候,最好的就是不要发附件,尽可能的把内容都在正文展示出来,如果把图片当做附件发送,收件人想要看到图片还需要下载,因为这不是办公邮件,所以最好不要麻烦每一个收件人来下载咨询类的内容。
群发邮件最好的还是用平台或者工具来实现,做html邮件来展现内容是最专业的选择,但是不是每个人都会做html的,那么这时该怎么办呢,我们可以找一些html模板,改里面的内容就可以了,一些专业发邮件的平台会内置很多模板选择。
另外也可以自己找一些模板。
限时分享丨海量HTML邮件都在这里,等你来拿! 【邮件中发送图片,是作为附件还是插入一个 HTML img tag 好】 这里不仅提供了模板,还给出了使用方法,非常简单。


    推荐阅读