<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <title>Dynamic Table Email</title>
</head>
<body>
<table style="border-width: 1px;border-collapse: collapse;margin: 0 auto;width: 100%;">
    <tr>
        <th style="border-width:1px;padding:8px;border-style:solid;background-color:#dedede;"
            th:each="header : ${headers}">[[${header}]]
        </th>
    </tr>
    <tr th:each="row : ${rows}">
        <td style="border-width:1px;padding:8px;border-style:solid;" th:each="cell : ${row}" th:text="${cell}">
            [[${cell}]]
        </td>
    </tr>
</table>
</body>
</html>