使用Python发送邮件
import smtplib
from email.mime.text import MIMEText
from email.header import Header
from email.mime.application import MIMEApplication
from email.mime.multipart import MIMEMultipart
smtp = smtplib.SMTP_SSL(host='smtp.163.com', port=465)
smtp.login(user='xxxxxxx@163.com', password='NUEIVEXIASIFCETF')
msg = MIMEMultipart()
msg['From'] = "xxxxxx@163.com"
msg['To'] = "xxxxxxxx@qq.com>"
msg['Subject'] = Header("视频播放完毕邮件提醒", charset='utf8')
text_content = MIMEText("所有课程视频都已播放完毕。", _charset='utf8')
msg.attach(text_content)
smtp.send_message(msg=msg, from_addr="xxxxxxx@163.com", to_addrs="xxxxxx@qq.com")