在php电子邮件中显示图像标签

时间:2013-12-16 01:02:14

标签: php html email

我不知道为什么,这很简单,但Hotmail只是不会在用PHP发送的html电子邮件中显示图像。

以下是代码:

<div id="body" style="font-family:Arial, Tahoma;font-size:12px;width:650px;margin:auto;">
    <a href="http://www.2hu.fr/"><img src="http://www.2hu.fr/img/logo.png" alt="Logo 2HU" width="129" height="49"/></a>
    <div id="notification" style="background-color:#f2f2f2;border:1px solid #C4CDE0;padding:10px;">
        <?php echo $content;    ?>
    </div>
    <div id="footer" style="font-size:11px;text-align:center;color:#999;">
        Mail automatique de notification - Aller sur <a href="http://www.2hu.fr/" style="color:#d84c1c;">2hu.fr</a>
    </div>
</div>

正如您所看到的那样,它非常简单,但图像没有显示,如果我查看源代码,则hotmail网址会出现404错误,而当我直接使用浏览器访问图片网址时效果非常好。

有谁的想法?

由于

2 个答案:

答案 0 :(得分:0)

您可以尝试将图像数据直接附加为base64

答案 1 :(得分:-1)

使用phpmailer

可能会更好
相关问题