Created
October 9, 2017 20:15
-
-
Save OtavioBraga/ef2b0d40478d8a22e3dd88ea4b8e7c48 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
import smtplib | |
smtp_server = smtplib.SMTP('smtp.gmail.com', 587) | |
smtp_server.ehlo() | |
smtp_server.starttls() | |
smtp_server.login('[email protected]', '<App Password>') | |
smtp_server.sendmail('[email protected]', '[email protected]', 'Subject: Happy Australia Day!\nHi Everyone! Happy Australia Day! Cheers, Julian') | |
smtp_server.quit() | |
print('Email sent successfully') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment