- 工信部備案號 滇ICP備05000110號-1
- 滇公安備案 滇53010302000111
- 增值電信業務經營許可證 B1.B2-20181647、滇B1.B2-20190004
- 云南互聯網協會理事單位
- 安全聯盟認證網站身份V標記
- 域名注冊服務機構許可:滇D3-20230001
- 代理域名注冊服務機構:新網數碼
Python2.7
#!/usr/bin/env python2.7 # -*- coding=utf-8 -*- import smtplib from email.mime.text import MIMEText _user = "648613081@qq.com" _pwd = "這里改成你的授權碼" _to = "648613081@qq.com" msg = MIMEText("this is a email from python,ha ha ha ...") msg["Subject"] = "這里是主題" msg["From"] = _user msg["To"] = _to try: s = smtplib.SMTP_SSL("smtp.qq.com", 465) s.login(_user, _pwd) s.sendmail(_user, _to, msg.as_string()) s.quit() print "發送成功" except s.smtplib.SMTPException, e: print "發送失敗"
Python3.6
#!/usr/bin/env python3.6 # -*- coding=utf-8 -*- import smtplib from email.mime.text import MIMEText _user = "648613081@qq.com" _pwd = "這里改成你的授權碼" _to = "648613081@qq.com" msg = MIMEText("this is a email from python,ha ha ha ...") msg["Subject"] = "這里是主題" msg["From"] = _user msg["To"] = _to try: s = smtplib.SMTP_SSL("smtp.qq.com", 465) s.login(_user, _pwd) s.sendmail(_user, _to, msg.as_string()) s.quit() print ("發送成功") except (s.smtplib.SMTPException, e): print ("發送失敗")
售前咨詢
售后咨詢
備案咨詢
二維碼
TOP