SHARE
TWEET

Untitled

a guest May 23rd, 2018 215 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import smtplib
  2. from email.mime.text import MIMEText
  3.  
  4. smtp_ssl_host = 'smtp.gmail.com'  # smtp.mail.yahoo.com
  5. smtp_ssl_port = 465
  6. username = 'user'
  7. password = 'pass'
  8. sender = 'MMATEUSZW.GT@GMAIL..COM'
  9. targets = ['jaluki@vp.pl']
  10.  
  11. msg = MIMEText('HUE')
  12. msg['Subject'] = 'HUE'
  13. msg['From'] = sender
  14. msg['To'] = ', '.join(targets)
  15.  
  16. for x in range(20):
  17.     print('poszedl mail nr ' + str(x))
  18.     server = smtplib.SMTP_SSL(smtp_ssl_host, smtp_ssl_port)
  19.     server.login(username, password)
  20.     server.sendmail(sender, targets, msg.as_string())
  21.     server.quit()
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top