Last active
November 1, 2017 18:21
-
-
Save Razzo78/79effe6ef0c2c7022d0e8fe120c258a8 to your computer and use it in GitHub Desktop.
Python - Send email
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import smtplib | |
sender = 'im@here.it' | |
receivers = ['reciver@mandi.it'] | |
message = """Ciao""" | |
smtpObj = smtplib.SMTP('smtp.gmail.com:587') | |
smtpObj.ehlo() | |
smtpObj.starttls() | |
smtpObj.login([user], [password]) | |
smtpObj.sendmail(sender, receivers, message) | |
print("Successfully sent email") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment