a guest Apr 20th, 2018 471 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- import smtplib
- s = smtplib.SMTP("smtp.gmail.com")
- s.login("username", "password")
- msg = "From: email@example.com\r\nTo: firstname.lastname@example.org\r\nSubject: Testing 1 2 3\r\n\r\n"
- msg += "This is a test, only a test."
- s.sendmail("email@example.com", "firstname.lastname@example.org", msg)
RAW Paste Data