stjianshen 2018-06-25 10:20 采纳率: 100%
浏览 5301
已采纳

nginx下使用python,用smtp.qq.com发送邮件

在pycharm本地测试ok,使用uwsgi代理访问ok,用nginx连接报错。邮箱的smtp功能已开启,use_ssl=True use_tls=False. 有人遇到过吗?还请不吝赐教。下面是错误回溯
send: 'ehlo localhost.localdomain\r\n'
reply: b'250-smtp.qq.com\r\n'
reply: b'250-PIPELINING\r\n'
reply: b'250-SIZE 73400320\r\n'
reply: b'250-AUTH LOGIN PLAIN\r\n'
reply: b'250-AUTH=LOGIN\r\n'
reply: b'250-MAILCOMPRESS\r\n'
reply: b'250 8BITMIME\r\n'
reply: retcode (250); Msg: b'smtp.qq.com\nPIPELINING\nSIZE 73400320\nAUTH LOGIN PLAIN\nAUTH=LOGIN\nMAILCOMPRESS\n8BITMIME'
send: 'AUTH PLAIN AGNoZW50ZW5nQHdheXNhdXRvbWF0aW9uLmNvbQBDajEyMzQ1Ng==\r\n'
reply: b'535 Error: authentication failed, system busy\r\n'
reply: retcode (535); Msg: b'Error: authentication failed, system busy'
send: 'AUTH LOGIN Y2hlbnRlbmdAd2F5c2F1dG9tYXRpb24uY29t\r\n'
reply: b'334 UGFzc3dvcmQ6\r\n'
reply: retcode (334); Msg: b'UGFzc3dvcmQ6'
send: 'Q2oxMjM0NTY=\r\n'
reply: b'535 Error: authentication failed, system busy\r\n'
reply: retcode (535); Msg: b'Error: authentication failed, system busy'
Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/local/lib/python3.6/lib/python3.6/threading.py", line 916, in bootstrap_inner
self.run()
File "/usr/local/lib/python3.6/lib/python3.6/threading.py", line 864, in run
self._target(*self._args, **self._kwargs)
File "./app/email.py", line 8, in send_async_eamil
mail.send(msg)
File "/home/www/.virtualenvs/env/lib/python3.6/site-packages/flask_mail.py", line 491, in send
with self.connect() as connection:
File "/home/www/.virtualenvs/env/lib/python3.6/site-packages/flask_mail.py", line 144, in __enter
_
self.host = self.configure_host()
File "/home/www/.virtualenvs/env/lib/python3.6/site-packages/flask_mail.py", line 165, in configure_host
host.login(self.mail.username, self.mail.password)
File "/usr/local/lib/python3.6/lib/python3.6/smtplib.py", line 730, in login
raise last_exception
File "/usr/local/lib/python3.6/lib/python3.6/smtplib.py", line 721, in login
initial_response_ok=initial_response_ok)
File "/usr/local/lib/python3.6/lib/python3.6/smtplib.py", line 642, in auth
raise SMTPAuthenticationError(code, resp)
smtplib.SMTPAuthenticationError: (535, b'Error: authentication failed, system busy')

  • 写回答

2条回答 默认 最新

  • threenewbee 2018-06-25 15:31
    关注

    和ngnix没有关系,你的web服务器,也就是真正发邮件的那个服务器,是否能使用ssl连上smtp.qq.com。端口是否打开,以及用户名密码的认证,这里显示报错。

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 powerbuilder出现这样的报错
  • ¥15 h3.6m 人类行为预测论文复现
  • ¥50 wordpress项目注册报失败刷新后其实是成功状态,请求排查原因
  • ¥20 linxu服务器僵尸进程不释放,代码如何修改?
  • ¥15 pycharm激活不成功
  • ¥40 如果update 一个列名为参数的value
  • ¥15 基于51单片机的水位检测系统设计中LCD1602一直不显示
  • ¥15 OCS2安装出现问题,请大家给点意见
  • ¥15 ros小车启动launch文件报错
  • ¥15 vs2015到期想登陆但是登陆不上