Razzo78
11/1/2017 - 6:21 PM

Python - Send email

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")