yagmail
yagmail copied to clipboard
Issue with email formatting and inline usage
Hello,
I would like to display an image in a table. I tried to used yagmail.inline but how can I embed this inline in a table or other customized email template in html format?
Regards
Maybe try combining them? Untested:
yag = yagmail.SMTP(...)
yag.send(contents=["<table><tr><td>",
yagmail.inline("link/to/image.png"),
"</td></tr></table>"])
Hello Pascal, I already tried this one but unfortunately not working. I was also planning to use a template library such as Mako to manage my email template.
eg, putting in the file:
<table>
<tr>
<td>${image}</td>
</tr>
</table>
and replace variable information through the renderer of the template library.