Created
January 17, 2014 08:15
-
-
Save kingofhawks/8470008 to your computer and use it in GitHub Desktop.
send Mail via SMTP QQ
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
from email.mime.text import MIMEText | |
from smtplib import SMTP_SSL as SMTP #For TLS please use SMTP_SSL instead, such as QQ mail | |
#import smtplib | |
_user = "[email protected]" | |
_pwd = "xxxx" | |
_to = "[email protected]" | |
msg = MIMEText("Content") | |
msg["Subject"] = "Stock Price Threshold" | |
msg["From"] = _user | |
msg["To"] = _to | |
s = SMTP("smtp.qq.com") | |
s.login(_user, _pwd) | |
s.sendmail(_user, _to, msg.as_string()) | |
s.close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment