Python: Send Email
Here's a python script to send email.
# -*- coding: utf-8 -*- # python import smtplib smtpServer='smtp.example.com'; fromAddrfirstname.lastname@example.org'; toAddremail@example.com'; text='''Subject: newfound love Hi friend, long time no write, i have a new manifesto i think it would be of interest for you to peruse. ''' server = smtplib.SMTP(smtpServer) server.set_debuglevel(1) server.sendmail(fromAddr, toAddr, text) server.quit()
set_debuglevel() is nice because you see all the interactions with the smtp server. Useful when you want to see what's going on with a smtp server.
If you have a question, put $5 at patreon and message me.