Pie*_*iet 5 php email thunderbird inline image
我想通过PHP发送带有内联/嵌入图像(又名cid)的邮件.邮件已成功发送并在Gmail中正确接收.但是,在Thunderbird(Windows的最新版本)中,不显示内嵌/嵌入图像.
我按照这个帖子中给出的信息,但它仍然无法正常工作.因此内嵌/嵌入图像显示在Gmail中,但不显示在Thunderbird中.有人知道这里的问题吗?
To: example@example.com
Subject: Test
From: noreply@test.com <noreply>
MIME-Version: 1.0
Content-Type: multipart/related; boundary="52cd9ebf4fb8c9b0547e93b82b3f3f6b"
--52cd9ebf4fb8c9b0547e93b82b3f3f6b
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Test mail</title>
</head>
<body>
<img src="cid:myImage" alt="This is a embedded image" />
</body>
</html>
--52cd9ebf4fb8c9b0547e93b82b3f3f6b
Content-Type: image/jpg; name="myImage.jpg"
Content-Transfer-Encoding: base64
Content-ID: <myImage>
Content-Disposition: inline; filename="myImage.jpg"
[base64 encoded string goes here.]
--52cd9ebf4fb8c9b0547e93b82b3f3f6b--
Run Code Online (Sandbox Code Playgroud)
嗯...在RFC 1521中说 Content-Type 标头的格式是这样的
文本内容类型标头字段的正式语法如下
:文本类型 := "文本" "/" 文本子类型 [";" “字符集”“=”字符集]
文本子类型 := "plain" / 扩展令牌
字符集:=“us-ascii”/“iso-8859-1”/“iso-8859-2”/“iso-8859-3”/“iso-8859-4”/“iso-8859-5”/“ iso-8859-6"/"iso-8859-7"/"iso-8859-8"/"iso-8859-9"/扩展令牌;不区分大小写
我的意思是内容类型,然后是字符集但是你把
内容类型:图片/jpg;名称=“myImage.jpg”
所以...这可能会破坏您的形象...另一个建议是将您的内容 ID 采用小写而不是驼峰式大小写
问候埃米利亚诺
| 归档时间: |
|
| 查看次数: |
335 次 |
| 最近记录: |