0
Use HTML.
When sending the email, pass the generated HTML as the email text and enable the message body option as HTML. I do not know what you use to send email, so it is difficult to improve, if you give more details, help more. I can say that using the SmtpClient
default. NET is just do mensagem.IsBodyHtml = true
.
Writing the HTML code in the code itself can be bad and disorganized, you can use templates for this. If you want to opt for simplicity, you can create an HTML file, put tokens in place of the data (ex.: ##nome_empresa##
) and replace before sending. You can use Postalmvc and several other libraries.
<table>
<thead>
<tr>
<th>Empresa</th>
<!-- seguir criando os TH's -->
<tr>
<thead>
<tbody>
<tr>
<td>Nome da empresa</td>
<!-- seguir criando os TD's -->
<tr>
<tbody>
</table>