Skip to content

Instantly share code, notes, and snippets.

@justinallen
Created November 3, 2017 00:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save justinallen/2788e794ecf4a1df5c7e6e555b5c1e4e to your computer and use it in GitHub Desktop.
Save justinallen/2788e794ecf4a1df5c7e6e555b5c1e4e to your computer and use it in GitHub Desktop.
stupid simple email notification in python
# all thanks to nael shiab's post here: http://naelshiab.com/tutorial-send-email-python
# adding gist for my own reference / ease remembering
import smtplib
from_email = "########@gmail.com"
from_email_password = "somethingsecure"
to_email = "#######@some_email.com"
server = smtplib.SMTP('smtp.gmail.com', 587)
server.starttls()
server.login(from_email, from_email_password)
msg = "HELLOOOOO!!!"
server.sendmail(from_email, to_email, msg)
server.quit()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment