PHP - QR Image HTML Email

为君一笑 提交于 2019-12-12 02:17:58

问题


This is an old post. Please refer to this post for current issue


回答1:


You can't dump the base64 src into the body of the email, you have to treat it like an attachment. Use a content header in place of the src. Here's a snippet of how gmail does it.

Email Content Header

Content-Type: image/png; name="InlineImage.png"
Content-Disposition: inline; filename="InlineImage.png"
Content-Transfer-Encoding: base64
Content-ID: <ii_ikqclluk0_152ed84122ba57fd>
X-Attachment-Id: ii_ikqclluk0_152ed84122ba57fd

--base64 here--

HTML

<img src="cid:ii_ikqclluk0_152ed84122ba57fd">


来源:https://stackoverflow.com/questions/35442997/php-qr-image-html-email

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!