Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import smtplib
- HOST = "mySMTP.server.com"
- SUBJECT = "Test email from Python"
- TO = "mike@someAddress.org"
- FROM = "python@mydomain.com"
- text = "Python 3.4 rules them all!"
- BODY = "\r\n".join((
- "From: %s" % FROM,
- "To: %s" % TO,
- "Subject: %s" % SUBJECT ,
- "",
- text
- ))
- server = smtplib.SMTP(HOST)
- server.sendmail(FROM, [TO], BODY)
- server.quit()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement