我一直在关注这个问题,并且陷入了以下Python。
https://github.com/miohtama/LibertyMusicStore
它使用Django,后者又通过Python包Djrill将Mandrill用于电子邮件。它已设置并正常工作,但在SSL证书更新后,注意到注册不再有效但产生了“服务器错误”。信息。此事件的日志将在下面复制。
在添加了Mandrill的情况下设置了一个新的MailChimp帐户,我创建了一个新的API密钥并更新了MANDRILL_API_KEY条目。在Mandrill上,域名,SPF和DKIM已经过验证,但仍然无效。我不熟悉这个软件,如果你知道怎么做,我确信这很简单。如果我查看Mandrill API日志,它们完全是空白的,这让我觉得我在某个地方缺少某些配置,比如更改API密钥不足以更改Mandrill帐户。
这是在提交表单时生成问题的页面。
http://music.artbyte.me/musician-sign-up/
关于我做错的任何想法?
INFO 2017-01-28 09:07:48,278 connectionpool 86.142.174.63 - POST /signup/ HTTP/1.1" Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36 Starting new HTTP connection (1): mandrillapp.com
ERROR 2017-01-28 09:07:48,418 base - - - - -" - Internal Server Error: /signup/
Traceback (most recent call last):
File "/srv/django/applebytestore/venv/lib/python3.4/site-packages/django/core/handlers/base.py", line 111, in get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/srv/django/applebytestore/venv/lib/python3.4/site-packages/django/db/transaction.py", line 394, in inner
return func(*args, **kwargs)
File "./tatianastore/signup.py", line 116, in signup
File "./tatianastore/signup.py", line 103, in create_user
File "./tatianastore/emailer.py", line 22, in mail_store_owner
msg.send()
File "/srv/django/applebytestore/venv/lib/python3.4/site-packages/django/core/mail/message.py", line 286, in send
return self.get_connection(fail_silently).send_messages([self])
File "/srv/django/applebytestore/venv/lib/python3.4/site-packages/djrill/mail/backends/djrill.py", line 68, in send_messages
sent = self._send(message)
File "/srv/django/applebytestore/venv/lib/python3.4/site-packages/djrill/mail/backends/djrill.py", line 119, in _send
(msg_dict['to'], msg_dict['from_email']))
djrill.exceptions.MandrillAPIError: Mandrill API response 500
Failed to send a message to [{'name': '', 'email': 'n@n.com', 'type': 'to'}], from no-reply@libertymusicstore.net
答案 0 :(得分:3)
djrill文档说该项目自2016年4月起一直处于非活动状态。他们建议您改为使用django-anymail。
在生产中更新Python代码时,需要重新启动服务器(例如Apache或gunicorn)才能使更改生效。