Created
November 3, 2017 00:49
-
-
Save justinallen/2788e794ecf4a1df5c7e6e555b5c1e4e to your computer and use it in GitHub Desktop.
stupid simple email notification in python
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
# 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