我试图使用引导给我的电子邮件模板一种样式,但是每次laravel所做的是解析该模板,并在模板中有‘=’的地方添加一个'=‘,这将导致style=3D"table"而不是style="table",下面是邮件源代码的片段
<div class=3D"well">
<table class=3D"table table-bordered table-striped" id=3D'table'>
<thead>
<th>Group Name</th>
<th>Kpi Name</th>
<th>User Name</th>
</thead>
<tbody>
</tbody>
</table>
</div>这是我的模板代码
<html lang="en-US">
<head>
<meta charset="utf-8">
{{ HTML::style('app\\client\\css\\bootstrap.css') }}
{{ HTML::script('app\\javascripts\\js\\jquery-1.8.3.min.js') }}
{{ HTML::script('app\\client\\js\\bootstrap.min.js') }}
<style>
#table {
border: 2px solid #ccc;
border-radius: 5px;
}
</style>
</head>
<body>
<div class="well">
<table class="table table-bordered table-striped" id='table'>
<thead>
<th>Group Name</th>
<th>Kpi Name</th>
<th>User Name</th>
</thead>
<tbody>
@foreach ($groups as $group)
<tr>
<td>{{ $group['name'] }}</td>
<td>
<ul>
@if (array_key_exists('kpis', $group))
@foreach ($group['kpis'] as $kpi)
<li>{{ Kpi::find($kpi['kpi'])->title }}</li>
@endforeach
@endif
</ul>
</td>
<td>
<ul>
@if (array_key_exists('users', $group))
@foreach ($group['users'] as $user)
<li>{{ User::find($user['user'])->fName.' '.User::find($user['user'])->lName }}</li>
@endforeach
@endif
</ul>
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
<footer>
<br>
<br>
Regards,<br>
<strong>Yogesh Joshi</strong><br>
Group Leader
</footer>
</body>
</html>laravel或邮件服务器 (gmail或hotmail)中是否有我缺少的东西,或者存在一些问题,而且我已经交叉检查了脚本和样式文件,它们确实存在于公用文件夹中。
请帮助或提供任何替代方法。
发布于 2013-11-26 07:19:45
有关=3D项,请参见以下文章:3D在这个HTML中做什么?
我发现你正在尝试在你的电子邮件中加载javascript,这不是一个好主意。请参阅:电子邮件中支持JavaScript吗?
我也不确定是否要将样式表加载到html电子邮件中,所以我将把这个打开。
发布于 2013-12-13 21:08:45
在电子邮件中使用Bootstrap听起来有点过火,但是有一个名为HTML电子邮件的引导模板的老项目。不确定这是否有帮助。
此外,这个问题似乎与"有没有人收到过使用Twitter引导的HTML电子邮件?“问题的主题部分相同。
使用HTML电子邮件样板可能更容易,只需从实际项目中复制迷你样式表即可。
或者,如果您很懒,可以使用Mail猩猩wysiwyg -editor并将其导出到MC中。他们有非常好的wysiwyg编辑器和响应模板。我一直在使用它,它节省了一些时间和精力。
https://stackoverflow.com/questions/20208581
复制相似问题