Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import smtplib
- # creates SMTP session
- s = smtplib.SMTP('smtp.gmail.com', 587)
- # start TLS for security
- s.ehlo()
- s.starttls()
- # Authentication
- s.login("xxxxxxx@gmail.com", "pppppp")
- # message to be sent
- message = "Message_you_need_to_send"
- # sending the mail
- s.sendmail("xxxxx@gmail.com", "yyyyyy@gmail.com", message)
- # terminating the session
- s.quit()
Add Comment
Please, Sign In to add comment