Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 22 import smtplib
- 21 from time import sleep
- 20 import random
- 19
- 18 love = open('/tmp/frases.txt', 'r').readlines()
- 17
- 16 fromaddr = ''
- 15 toaddrs = ''
- 14
- 13 com = ['Com amor', 'Com esperanca', 'Com paixao', 'Com amizade', 'Com carinho', 'Com sinceridade']
- 12
- 11 para = ['Karu', 'Carlos', 'Graça', 'Gato']
- 10
- 9 # Credentials (if needed)
- 8 username = ''
- 7 password = ''
- 6
- 5 # The actual mail send
- 4 server = smtplib.SMTP('smtp.gmail.com:587')
- 3 server.starttls()
- 2 server.login(username,password)
- 1 for msg in love:
- 23 msg = 'Subject: {}\n\n{}'.format('{} para {}'.format(random.choice(com), random.choice(para), msg))
- 1 print('[*] Sending love: {}'.format(msg))
- 2 server.sendmail(fromaddr, toaddrs, msg)
- 3 sleep(15)
- 4 server.quit()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement