How can I send the HTML content in an email using Python? I can send simple text.
Actually, yagmail took a bit different approach.
It will by default send HTML, with automatic fallback for incapable email-readers. It is not the 17th century anymore.
Of course, it can be overridden, but here goes:
import yagmail
yag = yagmail.SMTP("me@example.com", "mypassword")
html_msg = """Hi!
How are you?
Here is the link you wanted.
"""
yag.send("to@example.com", "the subject", html_msg)
For installation instructions and many more great features, have a look at the github.