3 回答

TA貢獻(xiàn)2041條經(jīng)驗 獲得超4個贊
我沒有發(fā)現(xiàn)任何有用的答案,所以我提供了我的解決方案。
問題是您使用multipart/related的內(nèi)容類型在這種情況下并不好。我在multipart/mixed里面使用它multipart/alternative(它適用于大多數(shù)客戶端)。
消息結(jié)構(gòu)應(yīng)如下所示:
[Headers]
Content-type:multipart/mixed; boundary="boundary1"
--boundary1
Content-type:multipart/alternative; boundary="boundary2"
--boundary2
Content-Type: text/html; charset=ISO-8859-15
Content-Transfer-Encoding: 7bit
[HTML code with a href="cid:..."]
--boundary2
Content-Type: image/png;
name="moz-screenshot.png"
Content-Transfer-Encoding: base64
Content-ID: <part1.06090408.01060107>
Content-Disposition: inline; filename="moz-screenshot.png"
[base64 image data here]
--boundary2--
--boundary1--
然后它會工作
添加回答
舉報