Sending HTML email using Python - Stack Overflow
stackoverflow.com › questions › 882712Oct 21, 2019 · Here is a Gmail implementation of the accepted answer:. import smtplib from email.mime.multipart import MIMEMultipart from email.mime.text import MIMEText # me == my email address # you == recipient's email address me = "my@email.com" you = "your@email.com" # Create message container - the correct MIME type is multipart/alternative. msg = MIMEMultipart('alternative') msg['Subject'] = "Link ...