发送邮件
import smtplib
from email.mime.text import MIMEText
#登录
smtpserver = 'smtp.163.com'
port = 0
send = '.................' #账号
passwd = '..................' #密码
accept = '............' #发送账号
#格式/内容
subject = '邮件主题'
body = '<p>内容</p>'
msg = MIMEText(body, 'html', 'utf-8')
msg['from'] = send
msg['to'] = '1784062775@qq.com'
msg['subject'] = subject
#发邮件
smtp = smtplib.SMTP()
smtp.connect(smtpserver)
smtp.login(send, passwd)
smtp.sendmail(send, accept, msg.as_string())
smtp.quit()