Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import smtplib
- s = smtplib.SMTP("smtp.gmail.com")
- s.ehlo()
- s.starttls()
- s.ehlo()
- s.login("username", "password")
- msg = "From: username@gmail.com\r\nTo: other.user@gmail.com\r\nSubject: Testing 1 2 3\r\n\r\n"
- msg += "This is a test, only a test."
- s.sendmail("username@gmail.com", "other.user@gmail.com", msg)
- s.quit()
Add Comment
Please, Sign In to add comment