#给163发送邮件
import smtplib
from email.mime.text import MIMEText
nam='15527721040@163.com'
send='15527721040@163.com'
receive='371933505@qq.com'
pw = '37193350d' #此密码有误,运行时需修改
server='smtp.163.com'
port=0
message=MIMEText('<p>这是网页正文</p>','html','utf-8')
message['From']='xiatian'
message['To']='dongtian'
message['Subject']='big title'
smtp=smtplib.SMTP()
smtp.connect(server,25)
smtp.login(nam,pw)
smtp.sendmail(send,receive,message.as_string())
smtp.quit()
print('邮件发送成功,请查收')