Guest User

Untitled

a guest
Mar 11th, 2018
419
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. #!/usr/bin/python
  2.  
  3. # Simple Python script to test SMTP settings
  4. # Author: Anil Wadghule
  5. # Run it as $python test_smtp.py password
  6.  
  7. import smtplib
  8. import sys
  9. srv = smtplib.SMTP('smtp.gmail.com', 587)
  10. srv.set_debuglevel(1)
  11. srv.ehlo()
  12. srv.starttls()
  13. srv.login('anildigital@gmail.com', sys.argv[1])
  14. srv.sendmail('anildigital@gmail.com', 'anildigital@gmail.com', 'To:anildigital@gmail.com\nSubject:Hello\n\n This is test message')
  15. srv.quit()
Add Comment
Please, Sign In to add comment