Advertisement
Guest User

Untitled

a guest
Oct 7th, 2017
399
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. import smtplib
  2.  
  3. fromaddr = 'fromuser@gmail.com'
  4. toaddrs = 'ahanafy91amd@gmail.com'
  5. msg = 'There was a terrible error that occured and I wanted you to know!'
  6.  
  7. # Credentials (if needed)
  8. username = '********'
  9. password = '*******'
  10.  
  11. # The actual mail send
  12. server = smtplib.SMTP('smtp.gmail.com:587')
  13. server.starttls()
  14. server.login(username,password)
  15. server.sendmail(fromaddr, toaddrs, msg)
  16. server.quit()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement