coldfusion - anchor 标记无法正常工作,而是在 cfemail 内容中显示完整字符串

标签 coldfusion coldfusion-2016 cfmail

我写了一个关于发送电子邮件过程的功能。在这里我设置了邮件服务器详细信息管理设置。并编写以下代码用于发送电子邮件。我可以成功地向我的 Gmail 帐户发送和接收电子邮件。但在这里我添加了一些带有 anchor 标记值的段落,即单击我。

<cfoutput>

    <cfmail from="<a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="176372646357707a767e7b3974787a" rel="noreferrer noopener nofollow">[email protected]</a>" to="<a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="1561706661557278747c793b767a78" rel="noreferrer noopener nofollow">[email protected]</a>" username="<a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="5a37233f373b33361a3d373b333674393537" rel="noreferrer noopener nofollow">[email protected]</a>" password="mypass" port="587"  subject="Chaange title" >
        <p> I'm from test link <a href="http://localhost:8501/test.cfm"> click Me 2! </a> </p>
    </cfmail>

</cfoutput>

问题出在我的电子邮件中,未收到点击我作为链接的电子邮件。相反,它会显示有关 anchor 标记的整个 html。 FYR 请引用我的电子邮件内容图片。

enter image description here

注意:我也已经尝试过使用 cfsavecontent,但这对我没有帮助。

有人可以帮忙解决这个问题吗?为什么会发生这样的事?提前致谢。

最佳答案

type="html" 添加到您的 cfmail 标记中。这应该向最终用户的电子邮件客户端表明该消息应显示为 HTML 页面,而不仅仅是纯文本。

关于coldfusion - anchor 标记无法正常工作,而是在 cfemail 内容中显示完整字符串,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59840847/

相关文章:

coldfusion - CFMail 返回表格

coldfusion - Apache poi edate 公式没有实现?

coldfusion - 错误: Could not find the ColdFusion component or interface on Fw1 framework

datetime - 将随机时间添加到 DateTime 值

variables - 在 cfscript ColdFusion 中定义变量?

coldfusion - 阻止 ColdFusion 发送电子邮件

mysql - cfc 和 mySQL 中的 coldfusion 查询中的日期时间异常

java - jython 和 Coldfusion 兼容吗?

coldfusion - ColdFusion调用远程API偶尔会超时