新浪邮箱比较特殊,它需要验证,所以我们应该这样写:
content=MIMEText('hello,send by Python','plain','utf-8')
msg=MIMEMultipart()
msg['From']=Header(from_addr)
msg['Subject']=Header('Python 邮件测试','utf-8')
msg.attach(content)
也就是msg['From']不需要加上'utf-8'否则就会不通过验证,这样就能用新浪邮箱发送了
具体用发邮件的教程请参考我的另一篇博客:https://mp.csdn.net/postedit/86584076