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

查看:2002
本文介绍了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天全站免登陆