Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/python
- import time
- import smtplib
- print '*------------The Shabba Spammer------------*'
- sendaddrs = (raw_input('Send to: '))
- msg = (raw_input('Message: '))
- num = int(raw_input('How many times to send [No more than 50] : '))
- #login details
- username = (raw_input('GMAIL Username: '))
- pword = (raw_input('GMAIL Password: '))
- #mail sending (smtp connection)
- domserver = smtplib.SMTP('smtp.gmail.com:587')
- domserver.starttls()
- domserver.login(username, pword)
- x = (raw_input('Send message? [May take a few moments if multiple messages] [y/n] '))
- if x =='y':
- print "Sending emails..."
- for i in range(num):
- domserver.sendmail(username, sendaddrs, msg)
- domserver.quit()
- print 'Message sent'
- time.sleep(3)
- elif x =='n':
- print 'Action cancelled'
- domserver.quit()
- else:
- print 'Invalid decision'
- domserver.quit()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement