Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/python
- # Simple Python script to test SMTP settings
- # Author: Anil Wadghule
- # Run it as $python test_smtp.py password
- import smtplib
- import sys
- srv = smtplib.SMTP('smtp.gmail.com', 587)
- srv.set_debuglevel(1)
- srv.ehlo()
- srv.starttls()
- srv.login('[email protected]', sys.argv[1])
- srv.sendmail('[email protected]', '[email protected]', 'To:[email protected]\nSubject:Hello\n\n This is test message')
- srv.quit()
Add Comment
Please, Sign In to add comment