html = 'email contents'
msg.attach(MIMEText(html, 'html'))
s = smtplib.SMTP('localhost')
s.sendmail('from@mywebsite.com', 'to@email.com', msg.as_string())
s.quit()
Specify a sender when sending mail with Python (smtplib)