Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import smtplib
- # Establish a secure session with gmail's outgoing SMTP server using your gmail account
- server = smtplib.SMTP("smtp.gmail.com", 587)
- server.starttls()
- # the account that will send the emails
- server.login('me@gmail.com', 'password')
- # sendmail(from, to, msg)
- server.sendmail('me@gmail.com', '5551234567@tmomail.net', 'hey there!')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement