Guest User

Untitled

a guest
Apr 20th, 2018
516
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. import smtplib
  2.  
  3. s = smtplib.SMTP("smtp.gmail.com")
  4. s.ehlo()
  5. s.starttls()
  6. s.ehlo()
  7. s.login("username", "password")
  8. msg = "From: username@gmail.com\r\nTo: other.user@gmail.com\r\nSubject: Testing 1 2 3\r\n\r\n"
  9. msg += "This is a test, only a test."
  10. s.sendmail("username@gmail.com", "other.user@gmail.com", msg)
  11. s.quit()
Add Comment
Please, Sign In to add comment