Advertisement
Guest User

Untitled

a guest
Feb 22nd, 2019
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. import smtplib
  2.  
  3. # Establish a secure session with gmail's outgoing SMTP server using your gmail account
  4. server = smtplib.SMTP("smtp.gmail.com", 587)
  5.  
  6. server.starttls()
  7.  
  8. # the account that will send the emails
  9. server.login('me@gmail.com', 'password')
  10.  
  11. # sendmail(from, to, msg)
  12. server.sendmail('me@gmail.com', '5551234567@tmomail.net', 'hey there!')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement