Advertisement
Guest User

Untitled

a guest
Aug 10th, 2017
514
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.82 KB | None | 0 0
  1. import smtplib  
  2.  
  3. toaddrs  = raw_input('Who do you want to send this to?  ')
  4. msg = raw_input('Type your message here:\n \n    ')
  5.  
  6. spam = int(raw_input('How many times would you like your message sent? (Beware lag)  '))
  7.  
  8.  
  9. # Credentials (if needed)  
  10. username = raw_input('\nWhat is your gmail username?  ')
  11. password = raw_input('What is your gmail password?  ')
  12.  
  13. spammer = spam - 1
  14. spamstr = str(spammer)
  15.  
  16.  
  17. # The actual mail send
  18. server = smtplib.SMTP('smtp.gmail.com:587')  
  19. server.starttls()
  20. server.login(username,password)
  21. while spam > 0:
  22.     server.sendmail(username + '@gmail.com', toaddrs, msg)
  23.     print 'You have ' + spamstr + ' messages left to send.'
  24.     spam = spam - 1
  25.     spammer = spammer - 1
  26.     spamstr = str(spammer)
  27. server.quit()
  28.  
  29. print 'Operation Complete!'
  30. input('Press enter to exit...')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement