【问题标题】:How to Embed HTML code inside email using PHP如何使用 PHP 在电子邮件中嵌入 HTML 代码
【发布时间】:2020-09-27 09:02:03
【问题描述】:

我想在我们使用 PHP 发送的电子邮件中包含一个 html 元标记。

<meta name=\"yyyy\" content=\"uuuuu\" />

我期待这样的电子邮件:

你好,

感谢您的订阅。请在&lt;head&gt;中包含以下代码

&lt;meta name=\"yyyy\" content=\"uuuuu\" /&gt;

感谢和问候,

yy

在电子邮件中包含适用于所有电子邮件服务器(如 Gmail、Outlook 等)的 html 代码的最佳方法是什么?

提前致谢。

【问题讨论】:

    标签: php html email embed email-formats


    【解决方案1】:

    这是你需要的功能:

    $codeValue = htmlspecialchars("<meta name=\"yyyy\" content=\"uuuuu\" />");
    

    这样代码不会被解释

    【讨论】:

    • 哦,我知道代码 bbcode 但不知道 html 标记。感谢您的补充。
    猜你喜欢
    • 1970-01-01
    • 2020-12-14
    • 2010-12-23
    • 2019-11-01
    • 2016-12-07
    • 1970-01-01
    • 2017-12-03
    • 2013-08-04
    • 1970-01-01
    相关资源
    最近更新 更多