我为需要将其(模板)作为静态文件分发给大约 50 个客户的客户构建了一个 HTML 电子邮件模板。每个客户都需要一定程度的个性化(即徽标会改变,链接将是客户特定的等)。我在自定义区域中放置占位符没有问题,我会将数据从客户端转换为 csv 或类似格式。
我的问题是 - 个性化过程是否可以自动化,以便使用 csv 文件中的数据生成 50 个唯一的 HTML 文件?如此有效地合并邮件,但最终产品是 50 个静态且唯一的 HTML 文件而不是电子邮件?还是我应该硬着头皮手动编写 50 页代码?
<csv>
IMG,Text,UniqueURL
Customer1Logo,Customer1Text,URL1
Customer2Logo,Customer2Text,URL2
Customer3Logo,Customer3Text,URL3<csv>
<body>
<table class="body">
<tr>
<td class="center" align="center" valign="top">
<center>
<img src="DataFromTableColumn1">
<p>DataFromTableColumn2</p>
<a href="http://www.genericlink.com.au/DataFromTableColumn3">Link to Company</a>
</center>
</td>
</tr>
</table>
</body>