-
-
Save gaybro8777/6fd599f2f5296e910ef2d67184f11c30 to your computer and use it in GitHub Desktop.
send Mail via SMTP QQ
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 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