Advertisement
Guest User

Untitled

a guest
Feb 5th, 2019
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.98 KB | None | 0 0
  1. import smtplib
  2. def cls():
  3. print('\n'*10)
  4. print('\n'*10)
  5. print('\n'*10)
  6. print('\n'*10)
  7. print('\n'*10)
  8.  
  9. def main():
  10. print("-------------------")
  11. print("| Sub 2 Pewds |")
  12. print("-------------------")
  13. print('\n'*10)
  14.  
  15. password = input('Your email password ---> ')
  16.  
  17. cls()
  18. x = 1
  19. fromaddress = input('Your email address ---> ')
  20. databaseFileName = input('databaseFileName ---> ')
  21. msg = 'Do your part! Subscribe to pewdiepie in the name of the internet!'
  22. username = fromaddress
  23.  
  24. server = smtplib.SMTP('smtp.gmail.com:587')
  25. server.starttls()
  26. server.login(username,password)
  27.  
  28. studentDatabase = open(databaseFileName, 'r')
  29. emails = studentDatabase.readlines()
  30.  
  31. cls()
  32.  
  33. for email in emails:
  34. server.sendmail(fromaddress,email,msg)
  35. print("Message " + str(x) + " sent")
  36. x += 1
  37.  
  38. server.quit()
  39. spam = input()
  40.  
  41. cls()
  42.  
  43. main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement