Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import smtplib
- a = 1
- while a == 1:
- toaddrs = raw_input('Recipeints E-Mail:\n ')
- msg = raw_input('Type your message here:\n \n')
- spam = int(raw_input('How many times would you like your message sent? (Beware lag) '))
- # Credentials (if needed)
- username = raw_input('\nWhat is your gmail username? \n(Include @gmail.com)\n')
- password = raw_input('What is your gmail password?\n')
- spammer = spam - 1
- spamstr = str(spammer)
- # The actual mail send
- server = smtplib.SMTP('smtp.gmail.com:587')
- server.starttls()
- server.login(username,password)
- while spam > 0:
- server.sendmail(username + '@gmail.com', toaddrs, msg)
- print 'You have ' + spamstr + ' messages left to send.'
- spam = spam - 1
- spammer = spammer - 1
- spamstr = str(spammer)
- server.quit()
- print 'Operation Complete!'
- close = raw_input('\n\n1: Exit \n2: New Recipeint\n\n')
- if close == "2":
- print('\n\n')
- else:
- break
Add Comment
Please, Sign In to add comment