mail using PHP send a image tag

后端 未结 1 350
臣服心动
臣服心动 2021-01-21 17:26

The following header informations I have added to send a html content as a mail message.

$headers = \'MIME-Version: 1.0\' . \"\\r\\n\";

$he

相关标签:
1条回答
  • 2021-01-21 18:23

    You need to include the image as an attachment if you want it inline.

    What you do is in your HTML, instead of putting <img src="filename.jpg" />, you put the Content-ID of the image, i.e, <img src="cid:$cid" />

    This article has a better breakdown with a working example:

    http://www.phpeveryday.com/articles/PHP-Email-Using-Embedded-Images-in-HTML-Email-P113.html

    0 讨论(0)
提交回复
热议问题