I'm sending emails via python using MIMEText.
A crude short example:
message = MIMEText('Hi,\n\nYour taxes are due.\n\nTODAY.\n\nBest,\n\nIRS.')
What if I want TODAY to be italicized and/or bolded in the email?
MIMEText supports html format. You can do this:
message="""\
<html>
<head></head>
<body>
<b>"""This is bold"""</b>
<i>"""This is italic"""</i>
</body>
</html>
"""
MIMEText(message,'html')
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With