HTML 电子邮件正文是否可以引用作为附件发送的文件(在同一封电子邮件中)? [英] Can an HTML email body reference a file sent as an attachment (in the same email)?

查看:33
本文介绍了HTML 电子邮件正文是否可以引用作为附件发送的文件(在同一封电子邮件中)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

HTML 电子邮件可以使用图像附件作为标签的来源吗?

Can an HTML email use an image attachment as the source for tag?

假设我要发送一封包含每个电子邮件特定图像的电子邮件 - 它们作为电子邮件的附件发送 - 电子邮件中的 HTML 正文可以使用这些图像吗?我的猜测是没有,但是是否有任何hacks 或解决方法可以使它起作用?

Let's say I am sending an email with per-email specific images - and they are sent as an attachment to the email - can the HTML body within the email use the those images? My guess would be no, but are there any hacks or workarounds that would make it work?

谢谢,

推荐答案

无需修改.使用 cid: URI 方案

No hacks needed. Use the cid: URI scheme

 --boundary-example 1
 Content-Type: Text/HTML; charset=US-ASCII

 to the other body part, for example through a statement such as:
 <IMG SRC="cid:foo4*foo1@bar.net" ALT="IETF logo">

 --boundary-example-1

 Content-ID: <foo4*foo1@bar.net>
 Content-Type: IMAGE/GIF
 Content-Transfer-Encoding: BASE64

 R0lGODlhGAGgAPEAAP/////ZRaCgoAAAACH+PUNvcHlyaWdodCAoQykgMTk5
 NSBJRVRGLiBVbmF1dGhvcml6ZWQgZHVwbGljYXRpb24gcHJvaGliaXRlZC4A
 etc...

 --boundary-example-1--

这篇关于HTML 电子邮件正文是否可以引用作为附件发送的文件(在同一封电子邮件中)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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