Advertisement
Guest User

python3

a guest
Feb 6th, 2019
268
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.46 KB | None | 0 0
  1. NU nano 3.2                           testing.py
  2.  
  3. #!/usr/bin/python
  4.  
  5. import smtplib
  6.  
  7. import test1
  8.  
  9. smtpserver = smtplib.SMTP("smtp.gmail.com" , 587)
  10. smtpserver.ehlo()
  11. smtpserver.starttls()
  12.  
  13. user = input("Enter Email address: ")
  14. password =  test1.test1()
  15. importlib.import_test1 (test1.py)
  16.  
  17. try:
  18.     smtpserver.login (user, password)
  19.     if password == "password":
  20.         print("correct: %s" % password)
  21. except smtplib.SHTPAuthencationError:
  22.     print("wrong: %s" % password)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement