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

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条)

相关推荐 更多相似问题