【发布时间】:2014-11-17 07:36:47
【问题描述】:
我有一个脚本,它输入表单数据,然后生成一封电子邮件给完成表单的用户。电子邮件发送给电子邮件收件人一切正常,但图像未显示。(我在邮件中看到一个损坏的链接图标)。
我查看了电子邮件到达时的源代码,它出现在双引号之前的反斜杠。我该如何让它发挥作用?
邮件源代码:
<img src=\"https://amb.cbussuper.com.au/registration-test/images/sig.png\” /><br><br>
PHP 代码:
$message = "<html><body>";
$message .= "<b>Thank you for registering for the meeting</b><br>";
$message .= "- Day: 28 October 2014<br>";
$message .= "- Time: 7pm<br><br>";
$message .= "If you have any questions about the meeting please email email@address.com.au<br><br>";
$message .= "Please do not reply - this is an automatically generated email.<br><br>";
$message = stripcslashes($message);
$message .= '<img src="https://website.com.au/registration/images/sig.png" /><br><br>';
$message .= "</body></html>";
【问题讨论】:
-
向我们展示更多代码。我们需要显示您对 PHP Mailer 的调用。
-
为什么
"和”不同?这只是复制/粘贴时的格式问题,还是实际上是这样?就在实际发送电子邮件之前,在邮件上使用stipslashes以双重确保:eval.in/197214
标签: php email phpmailer stripslashes