Guest User

Untitled

a guest
Dec 19th, 2017
338
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. import smtplib
  2. # creates SMTP session
  3. s = smtplib.SMTP('smtp.gmail.com', 587)
  4.  
  5. # start TLS for security
  6. s.ehlo()
  7. s.starttls()
  8.  
  9. # Authentication
  10. s.login("xxxxxxx@gmail.com", "pppppp")
  11.  
  12. # message to be sent
  13. message = "Message_you_need_to_send"
  14.  
  15. # sending the mail
  16. s.sendmail("xxxxx@gmail.com", "yyyyyy@gmail.com", message)
  17.  
  18. # terminating the session
  19. s.quit()
Add Comment
Please, Sign In to add comment