Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- import smtplib
- import time
- sent=0
- chooise=raw_input("Would you like to more send? y/n: ")
- if chooise=="y":
- username=raw_input("you gmail username: ")
- password=raw_input("you gmail password: ")
- print ("Connecting to server please wait...")
- smtpserver=smtplib.SMTP("smtp.gmail.com",587)
- smtpserver.ehlo()
- smtpserver.starttls()
- smtpserver.ehlo
- smtpserver.login(username,password)
- print("Connection succesfull")
- print('press enter to stop')
- elist=[]
- while True:
- targetxxx=raw_input('Target email: ')
- if len(targetxxx)==0:break
- elist.append(targetxxx)
- more_sent=input('how many emails to send: ')
- message=raw_input('youre messeage to target:')
- while sent <=more_sent:
- for targetxxx in elist:
- smtpserver.sendmail(username,targetxxx,message)
- print ("Sending emails")
- sent+=1
- print ("succesfull send")
- elif chooise=="n":
- username=raw_input("your gmail username: ")
- password=raw_input("your password: ")
- smtpserver=smtplib.SMTP("smtp.gmail.com",587)
- smtpserver.ehlo()
- smtpserver.starttls()
- smtpserver.ehlo
- smtpserver.login(username,password)
- print("Connect to server succesfull")
- targetxxx=raw_input("enter target E-mail: ")
- message=raw_input("Please enter a message: ")
- more_Sent=input("How many messages to send?: ")
- for i in xrange(more_Sent + 1):
- smtpserver.sendmail(username,targetxxx,message)
- print "Sent to %s %d emails." % (targetxxx,more_Sent)
- send= more_Sent + 1
- print "was sent succesfull"
- time.sleep(1)
- else:
- print "Please choose y or n"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement