Created
February 15, 2017 09:20
-
-
Save uoxiu/9575c502271cbbc203a53a32d510df72 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
from smtplib import SMTP_SSL | |
from email.mime.text import MIMEText | |
send_to = '[email protected]' | |
# nu uita de active https://www.google.com/settings/security/lesssecureapps | |
smtp_user = '[email protected]' | |
smtp_pass = 'myfkpassword' | |
smtp_conn = SMTP_SSL('smtp.gmail.com', 465) | |
smtp_conn.set_debuglevel(True) | |
smtp_conn.login(smtp_user, smtp_pass) | |
msg = MIMEText('Content of message') | |
msg['Subject']= 'Subject of email' | |
msg['From'] = smtp_user | |
smtp_conn.sendmail(smtp_user, send_to, msg.as_string()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment