Skip to content

Instantly share code, notes, and snippets.

@Razzo78
Last active November 1, 2017 18:21
Show Gist options
  • Save Razzo78/79effe6ef0c2c7022d0e8fe120c258a8 to your computer and use it in GitHub Desktop.
Save Razzo78/79effe6ef0c2c7022d0e8fe120c258a8 to your computer and use it in GitHub Desktop.
Python - Send email
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