Moe
11/22/2024, 7:38 PMprefect-email
to send out email notifications through an STMP server. My question is, is it able to render HTML? E.g.
subject = "<p><b><u>Summary of ETL Job:</u></b></p>"
and body message might look like:
detailed = f"""
<p><b><u>Detailed Report:</u></b></p>
<table style="border-collapse: collapse;">
<thead>
<tr>
{" ".join([f"<th style=''border: 1px solid black; padding: 5px; width: {'220px' if header in ('Error Message', 'Last Updated') else '60px'};''>{html.escape(str(header))}</th>" for header in headers])}
</tr>
</thead>
<tbody>
{" ".join(rows)}
</tbody>
</table>
"""
Moe
11/22/2024, 9:22 PMmsg
and there is message plain option for non html.