37,737
社区成员
发帖
与我相关
我的任务
分享import smtplib
from email.mime.text import MIMEText
me = 'wewsa265@163.com'
pw = 'qweas123098'
you =['koio@163.com']
msg =MIMEText('hello, send by Python...', 'plain', 'utf-8')
msg['Subject'] = 'The contents of %s'
msg['From'] = me
msg['To'] = you
server = smtplib.SMTP('smtp.163.com',465)
server.starttls()
server .login(me,pw)
server .sendmail(me, [you], msg.as_string())
server .quit()