Advertisement
vmen

spam_email

Nov 25th, 2017
508
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.56 KB | None | 0 0
  1. import smtplib
  2.  
  3. #Specifying the From and To addresses
  4.  
  5. fromaddress = "freakzsec@gmail.com"
  6. toaddress = " "
  7.  
  8. #Gmail Login
  9.  
  10. username = "freakzsec"
  11. password = " "
  12.  
  13. #Writing the message which will appear in the mail
  14.  
  15. message = """
  16. """
  17.  
  18. #Creating a connection with the Gmail server
  19.  
  20. server =smtplib.SMTP('smtp.gmail.com:587')
  21. server.starttls()
  22. server.login(username,password)
  23.  
  24. #Creating a for loop to send multiple mails
  25.  
  26. for i in range (0,10):
  27.   server.sendmail(fromaddress,toaddress,message)
  28.   print "mail sent"
  29.  
  30. #closing the server
  31. server.quit()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement