cdhigh / KindleEar

Aggregates RSS and web content(Calibre recipe), sends to Kindle, and includes an e-ink optimized online reader.
http://cdhigh.github.io/KindleEar/
MIT License
2.73k stars 630 forks source link

本地运行发送邮件失败(GAE上可以) #633

Closed hjianhao closed 3 years ago

hjianhao commented 3 years ago

运行参数如下: dev_appserver.py \ --host=0.0.0.0 \ --enable_host_checking=False \ --smtp_host=smtp.qq.com \ --smtp_port=587 \ --smtp_user=xxx@qq.com \ --smtp_password=xxxx(qq邮箱授权码 \ --smtp_allow_tls=True \ ./app.yaml ./module-worker.yaml

错误如下。 用户名密码是设置对的,设置错了会有认证错误,不是下面的错误。试了qq,outlook,gmail都是同样错误。

ERROR 2021-01-25 09:36:07,303 api_server.py:385] Exception while handling mail.Send() Traceback (most recent call last): File "/home/hjianhao/dev/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/api_server.py", line 353, in _handle_POST api_response = _execute_request(request).Encode() File "/home/hjianhao/dev/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/api_server.py", line 169, in _execute_request make_request() File "/home/hjianhao/dev/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/api_server.py", line 164, in make_request request_id) File "/home/hjianhao/dev/google-cloud-sdk/platform/google_appengine/google/appengine/api/apiproxy_stub.py", line 151, in MakeSyncCall method(request, response) File "/home/hjianhao/dev/google-cloud-sdk/platform/google_appengine/google/appengine/api/mail_stub.py", line 374, in _Send self._SendSMTP(mime_message, smtp_lib) File "/home/hjianhao/dev/google-cloud-sdk/platform/google_appengine/google/appengine/api/mail_stub.py", line 295, in _SendSMTP smtp.quit() File "/usr/lib/python2.7/smtplib.py", line 773, in quit res = self.docmd("quit") File "/usr/lib/python2.7/smtplib.py", line 394, in docmd self.putcmd(cmd, args) File "/usr/lib/python2.7/smtplib.py", line 342, in putcmd self.send(str) File "/usr/lib/python2.7/smtplib.py", line 334, in send raise SMTPServerDisconnected('please run connect() first') SMTPServerDisconnected: please run connect() first

WARNING 2021-01-25 09:36:07,306 BaseHandler.py:175] sendmail to xxx@kindle.cn failed:SMTPServerDisconnected('please run connect() first',).

hjianhao commented 3 years ago

请关闭吧,不好意思,是config.py 中额SRC_MAIL没有设置。