对表单进行更改后,用户会收到一封电子邮件。我想使用 twitter bootstrap 以更易读的格式显示信息。令我惊讶的是,样式text-info
显示正确,但表格样式显示不正确。这是语法错误还是与 ColdFusion 用于创建电子邮件的 HTML 渲染引擎的类型有关?我正在使用 Outlook 查看电子邮件。
下面我试过了:
<cfmail from="test.com" to="me.com" subject="tester" type="html">
<html>
<head>
<!---<link href="/bootstrap/css/bootstrap.min.css" rel="stylesheet">--->
</head>
<body>
<style type="text/css">
<cfinclude template="/bootstrap/css/bootstrap.min.css">
</style>
<!--- Start comparing --->
<p class="text-info">
Has updated the following Project Information for Project
</p>
<table class="table table-striped" style="width: 600px">
<tr>
<th>Field</th>
<th>Original</th>
<th>Modified</th>
</tr>
<cfif compare(xOrig,xMod) IS NOT 0>
<tr>
<td>Field1</td>
<td>#xOrig</td>
<td>#xMod#</td>
</tr>
</cfif>
</table>
</body>
</html>
</cfmail>