- 工信部備案號 滇ICP備05000110號-1
- 滇公安備案 滇53010302000111
- 增值電信業(yè)務(wù)經(jīng)營許可證 B1.B2-20181647、滇B1.B2-20190004
- 云南互聯(lián)網(wǎng)協(xié)會理事單位
- 安全聯(lián)盟認(rèn)證網(wǎng)站身份V標(biāo)記
- 域名注冊服務(wù)機(jī)構(gòu)許可:滇D3-20230001
- 代理域名注冊服務(wù)機(jī)構(gòu):新網(wǎng)數(shù)碼
Python2.7
#!/usr/bin/env python2.7 # -*- coding=utf-8 -*- import smtplib from email.mime.text import MIMEText _user = "648613081@qq.com" _pwd = "這里改成你的授權(quán)碼" _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 "發(fā)送成功" except s.smtplib.SMTPException, e: print "發(fā)送失敗"
Python3.6
#!/usr/bin/env python3.6 # -*- coding=utf-8 -*- import smtplib from email.mime.text import MIMEText _user = "648613081@qq.com" _pwd = "這里改成你的授權(quán)碼" _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 ("發(fā)送成功") except (s.smtplib.SMTPException, e): print ("發(fā)送失敗")
售前咨詢
售后咨詢
備案咨詢
二維碼
TOP