请教关于SMTP发html内嵌图片邮件的问题:Hotmail、iclould等邮箱不能正常显示图片。。

mtimem 2014-08-12 05:21:47
以下是我的邮件源码:
Date: Thu, 1 Jan 1970 0:14:4 0000
From: 540502774@qq.com
To: testktestk@126.com;dvrdevice@163.com;ktimek@sohu.com;dvrdevice@sina.com;juandvrdevice@gmail.com;juantestacc@yahoo.com;ktimek@hotmail.com;juantestacc@icloud.com
SUBJECT: Video recorder Report
MIMI-Version:1.0
Content-Type:multipart/mixed;boundary="_NextPart_"
X-QQ-SENDSIZE: 520
Return-Path: 540502774@qq.com
Message-ID: <BAY004-MC2F36apzhad00a99e0e@BAY004-MC2F36.hotmail.com>
X-OriginalArrivalTime: 12 Aug 2014 06:07:22.0110 (UTC) FILETIME=[AE3011E0:01CFB5F3]

This is a multi-part message in MIME format

--_NextPart_
Content-Type: multipart/alternative;boundary="_Second_Part_"

--_Second_Part_
Content-Type:text/html;charset="UTF-8"
Content-Transfer-Encoding:quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<body>

<table frame = "vsides" align = "center">
<tr>
<td colspan = "2" style = "background-color:#99bbbb;text-align:center;">
<h1>move</h1>
</td>
</tr>
<tr>
<td colspan = "2" valign = "top" ><p><img src = "cid:jq31WB33hmq66M8C0yF" style = "width:650px;"></p></td>
</tr>
<tr>
<th colspan = "2" style = "background-color:#33CCFF;text-align:center;height:30px">CH1 2014.07.28 21:00</th>
</tr>
<tr>
<td colspan = "2" valign = "top" ><p><img src = "cid:e75fCf1q90A1va9HgJ4" style = "width:650px;"></p></td>
</tr>
<tr>
<th colspan = "2" style = "background-color:#33CCFF;text-align:center;height:30px">CH2 2014.07.28 22:00</th>
</tr>
<tr>
<td colspan = "2" valign = "top" ><p><img src = "cid:AE3MBza2oXuo69s7Rq3" style = "width:650px;"></p></td>
</tr>
<tr>
<th colspan = "2" style = "background-color:#33CCFF;text-align:center;height:30px">CH3 2014.07.28 22:00</th>
</tr>
<tr>
<td colspan = "2" valign = "top" ><p><img src = "cid:662qlB0EXi67Nxh1vJJ" style = "width:650px;"></p></td>
</tr>
<tr>
<th colspan = "2" style = "background-color:#33CCFF;text-align:center;height:30px">CH4 2014.07.28 22:00</th>
</tr>
<tr>
<td colspan = "2" valign = "top" ><p><img src = "cid:oK3Vv98wx904w09i4P2" style = "width:650px;"></p></td>
</tr>
<tr>
<th colspan = "2" style = "background-color:#33CCFF;text-align:center;height:30px">CH5 2014.07.28 22:00</th>
</tr>
<tr>
<td colspan = "2" valign = "top" ><p><img src = "cid:KiybeIyW9G9kuN1sr79" style = "width:650px;"></p></td>
</tr>
<tr>
<th colspan = "2" style = "background-color:#33CCFF;text-align:center;height:30px">CH6 2014.07.28 22:00</th>
</tr>
<tr>
<th colspan = "2" style= "background-color:#33CCFF;text-align:center;height:40px">NVR information</th>
</tr>
<tr>
<td style = "background-color:#33CCFF;text-align:center;height:10px">IP address</td>
<td style = "background-color:#33CCFF;text-align:center;height:10px">192.168.1.1</td>
</tr>
<tr>
<td style = "background-color:#33CCFF;text-align:center;height:10px">ID number</td>
<td style = "background-color:#33CCFF;text-align:center;height:10px">123456789</td>
</tr>

<tr>
<td colspan = "2" style = "background-color:#99bbbb;text-align:center;font-size:200%;">
<a href = "http://esee2.dvr163.com" target = "_blank">Visit eseenet!</a></td>
</tr>

<tr>
<td colspan = "2" style = "background-color:#99bbbb;text-align:center;font-size:100%;">
<a href = "http://www.juanvision.com" target = "_blank">www.juanvision.com</a></td>
</tr>
</table>

</body>
</html>
--_Second_Part_--

--_NextPart_
Content-Type:img/jpeg;name="CH1 2014.07.28 21:00.jpg"
Content-Transfer-Encoding:base64
Content-Disposition:inline
Content-ID:<jq31WB33hmq66M8C0yF>

下面就是图片的base64编码后的字符,76字符一行。
--_NextPart_--

在163 126 QQ gmail等其他邮箱都能正常显示图片,但是就是用浏览器访问Hotmail、iclould显示不了。。。
但当我用foxmail登陆Hotmail、iclould时又可以看到图片。

然后我尝试用qq的邮箱给Hotmail发了一个图片,能正常显示,可是我发现他的html标签前里面的等号后面了个3D。。。
这是什么意思、、、

以下是用QQ邮箱发的邮件的邮件源码
This is a multi-part message in MIME format.

------=_001_NextPart440288614466_=----
Content-Type: multipart/alternative;
boundary="----=_002_NextPart614073782448_=----"


------=_002_NextPart614073782448_=----
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: base64

DQoNCg0KNTQwNTAyNzc0QHFxLmNvbQ0K

------=_002_NextPart614073782448_=----
Content-Type: text/html;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

<html><head><meta http-equiv=3D"content-type" content=3D"text/html; charse=
t=3Dus-ascii"><style>body { line-height: 1.5; }body { font-size: 10.5pt; f=
ont-family: ????; color: rgb(0, 0, 0); line-height: 1.5; }</style></head><=
body>=0A<div><span></span><img src=3D"cid:_Foxmail.1@d14343b4-3417-bb82-f0=
96-4a38e4a12783" border=3D"0"></div>=0A<div><br></div><hr style=3D"width: =
210px; height: 1px;" color=3D"#b5c4df" size=3D"1" align=3D"left">=0A<div><=
span><div style=3D"MARGIN: 10px; FONT-FAMILY: verdana; FONT-SIZE: 10pt"><d=
iv>540502774@qq.com</div></div></span></div>=0A</body></html>
------=_002_NextPart614073782448_=------

------=_001_NextPart440288614466_=----
Content-Type: image/bmp;
name="=?us-ascii?B?Pz8/LmJtcA==?="
Content-Transfer-Encoding: base64
Content-ID: <_Foxmail.1@d14343b4-3417-bb82-f096-4a38e4a12783>

这里是图片的base64编码后的字符
------=_001_NextPart440288614466_=------


这个3D的字符是什么东东??
程序方面应该没有问题。。
应该是MIME或者是HTML代码的问题
...全文
2587 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
mtimem 2014-08-13
  • 打赏
  • 举报
回复
求解答
angel_su 2014-08-13
  • 打赏
  • 举报
回复
试试你的html部分Content-Transfer-Encoding:quoted-printable改成Content-Transfer-Encoding:8bit,quoted-printable编码的话,不可打印的ascii变成=XX,原=号变=3D,就像你说在foxmail看到的那个样子...
mtimem 2014-08-12
  • 打赏
  • 举报
回复
引用 3 楼 zhao4zhong1 的回复:
将=3D"全部替换为="
哪个是能正常显示图片的邮件源码。。。我自己的是没有3D的
赵4老师 2014-08-12
  • 打赏
  • 举报
回复
将=3D"全部替换为="
mtimem 2014-08-12
  • 打赏
  • 举报
回复
引用 1 楼 lovesmiles 的回复:
我觉得你这个问题应该移到web前端开发那边。
额,以前没来过这里,不知道这里的版块怎么分。。我程序是用C语言写的。。所以在这里问了,哈哈
勤奋的小游侠 2014-08-12
  • 打赏
  • 举报
回复
我觉得你这个问题应该移到web前端开发那边。

69,373

社区成员

发帖
与我相关
我的任务
社区描述
C语言相关问题讨论
社区管理员
  • C语言
  • 花神庙码农
  • 架构师李肯
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧