Advertisement
Guest User

Untitled

a guest
Apr 10th, 2017
1,334
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.65 KB | None | 0 0
  1. import smtplib
  2.  
  3. '''
  4. Email´s :
  5.  
  6. < KIM >
  7. kim.philipp@icloud.com
  8.  
  9. < DAVID >
  10. david.aksoy83@googlemail.com
  11. david-aksoy83@gmx.com
  12.  
  13. < MEINE >
  14. s.hawranke0601@gmail.com
  15. s.hawranke0701@gmail.com
  16. s.hawranke0801@gmail.com
  17. email.spam1337@gmail.com
  18.  
  19. '''
  20.  
  21.  
  22.  
  23. def email_send(amount_emails, email_message, counter, pw, email_target):
  24. while counter <= amount_emails:
  25.  
  26. mail = smtplib.SMTP("smtp.gmail.com", 587)
  27.  
  28. mail.ehlo()
  29.  
  30. mail.starttls()
  31.  
  32. mail.login("email.spam1337@gmail.com", pw[0])
  33.  
  34. mail.sendmail("email.spam1337@gmail.com", email_target, email_message)
  35.  
  36. mail.close
  37.  
  38. print(counter, "email´s have already been sent")
  39. counter += 1
  40. print("- - - - - - - - - - - - - - - - - - - - ")
  41.  
  42.  
  43.  
  44.  
  45. def email_target_question(email_target):
  46. email_target = input("Enter your target email [ David / Kim / Ich / spam acc]\n")
  47. print("- - - - - - - - - - - - - - - - - - - - ")
  48. if email_target == "david":
  49. email_target = ("david.aksoy83@googlemail.com")
  50. elif email_target == "kim":
  51. email_target = ("kim.philipp@icloud.com")
  52. elif email_target == "ich":
  53. email_target = ("s.hawranke0601@gmail.com")
  54. elif email_target == "spam acc":
  55. email_target = ("email.spam1337@gmail.com")
  56. else:
  57. pass
  58. return email_target
  59.  
  60.  
  61.  
  62. email_target = None
  63. counter = 1
  64. email_counter = 0
  65.  
  66.  
  67.  
  68. while True:
  69.  
  70. pw =[]
  71. with open("EmailPW.txt", "r") as myfile:
  72. for passwords in myfile:
  73. pw.append(passwords)
  74.  
  75. try:
  76. print(email_target_question(email_target))
  77. print(email_target)
  78.  
  79. amount_emails = int(input("Please enter the amount of e-mails you wanna send. \n"))
  80. print("- - - - - - - - - - - - - - - - - - - - ")
  81.  
  82.  
  83. email_message = input("Enter your email text message. \n")
  84. print("- - - - - - - - - - - - - - - - - - - - ")
  85.  
  86.  
  87. email_send(amount_emails, email_message, counter, pw, email_target)
  88. email_change_question = input("Do you wanna change the mail ? [ Y / N / EXIT ]\n")
  89. print("- - - - - - - - - - - - - - - - - - - - ")
  90.  
  91.  
  92. if email_change_question == "y":
  93. email_change = input("Which email do you wanna send to ?\n")
  94. print("- - - - - - - - - - - - - - - - - - - - ")
  95. email_target = email_change
  96. elif email_change_question == "n":
  97. pass
  98. elif email_change_question == "exit":
  99. break
  100. email_counter += 1
  101.  
  102. except:
  103. print("Please enter a valid information")
  104. print("- - - - - - - - - - - - - - - - - - - - ")
  105. print()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement