Created
August 4, 2014 09:31
-
-
Save fmartingr/9c510b77f17a33cd64c8 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
#!/usr/bin/python | |
import smtplib | |
gmail_user = "[email protected]" | |
gmail_pwd = "your_password" | |
msg['From'] = gmail_user | |
msg['To'] = to | |
msg['Subject'] = subject | |
mailServer = smtplib.SMTP("smtp.gmail.com", 587) | |
mailServer.ehlo() | |
mailServer.starttls() | |
mailServer.ehlo() | |
mailServer.login(gmail_user, gmail_pwd) | |
mailServer.sendmail(gmail_user, to, "Test") | |
# Should be mailServer.quit(), but that crashes... | |
mailServer.close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment