中心思想:
1将送信内容放到Map里
2将Map里的数据铺到templates
3将templates的内容放到数据库做持久化
4读数据库的邮件内容进行发送
引入模板引擎依赖
<!-- 模板-->
<dependency>
<groupId>org.freemarker</groupId>
<artifactId>freemarker</artifactId>
</dependency>
设计发信模板
将模板放入
resource/templates文件夹下
<html>
<head>
<style>
table.recall { border: 1px solid #808080; border-collapse:collapse;}
table.recall td { border: 1px solid #808080; border-collapse:collapse; padding:3px}
table.recall th { border: 1px solid #808080; border-collapse:collapse; padding:3px}
</style>
</head>
<body>
<div>${textHeader}</div>
<table class="recall">
<thead bgcolor="#99ff33">
<tr>
<th>name</th>
<th>school</th>
<th>rule</th>
<th>address</th>
<th>code</th>
<th>age</th>
</tr>
</thead>
<tbody>
<#list text as deal>
<tr>
<td >
${deal.name}
</td>
<td>
${deal.school}
</td>
<td>
${deal.rule}
</td>
<td>