大家是不是忘了将用户和密码进行base64编码,smtp是需要base64编码的,否则在传输过程会出错误 比如像这样 username = base64.b64encode(fromaddress.encode()).decode()