Closed mtrythall closed 6 years ago
Looks like we need email configuration of some sort. Testing here:
http://unicef-rapidpro-for-health.herokuapp.com/contact-us/
This happens on form submission.
Environment: Request Method: POST Request URL: https://unicef-rapidpro-for-health.herokuapp.com/contact_form/ Django Version: 1.11.12 Python Version: 3.6.4 Installed Applications: ['django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'django.contrib.sites', 'django.contrib.sitemaps', 'djangocms_admin_style', 'django.contrib.admin', 'django.contrib.redirects', 'cms', 'menus', 'treebeard', 'sekizai', 'filer', 'easy_thumbnails', 'django_countries', 'djangocms_text_ckeditor', 'djangocms_link', 'cmsplugin_filer_image', 'django_select2', 'storages', 'rh.apps.meta', 'rh.apps.content', 'rh.apps.icons', 'rh.apps.case_studies', 'rh.apps.steps'] Installed Middleware: ['django.middleware.security.SecurityMiddleware', 'whitenoise.middleware.WhiteNoiseMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.auth.middleware.SessionAuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', 'django.middleware.locale.LocaleMiddleware', 'django.contrib.redirects.middleware.RedirectFallbackMiddleware', 'cms.middleware.utils.ApphookReloadMiddleware', 'cms.middleware.user.CurrentUserMiddleware', 'rh.middleware.BetterCurrentPageMiddleware', 'cms.middleware.toolbar.ToolbarMiddleware'] Traceback: File "/app/.heroku/python/lib/python3.6/site-packages/django/core/handlers/exception.py" in inner 41. response = get_response(request) File "/app/.heroku/python/lib/python3.6/site-packages/django/core/handlers/base.py" in _get_response 187. response = self.process_exception_by_middleware(e, request) File "/app/.heroku/python/lib/python3.6/site-packages/django/core/handlers/base.py" in _get_response 185. response = wrapped_callback(request, *callback_args, **callback_kwargs) File "./rh/apps/content/views.py" in contact_form 28. mail_managers('Contact', message=message) File "/app/.heroku/python/lib/python3.6/site-packages/django/core/mail/__init__.py" in mail_managers 118. mail.send(fail_silently=fail_silently) File "/app/.heroku/python/lib/python3.6/site-packages/django/core/mail/message.py" in send 348. return self.get_connection(fail_silently).send_messages([self]) File "/app/.heroku/python/lib/python3.6/site-packages/django/core/mail/backends/smtp.py" in send_messages 104. new_conn_created = self.open() File "/app/.heroku/python/lib/python3.6/site-packages/django/core/mail/backends/smtp.py" in open 64. self.connection = self.connection_class(self.host, self.port, **connection_params) File "/app/.heroku/python/lib/python3.6/smtplib.py" in __init__ 251. (code, msg) = self.connect(host, port) File "/app/.heroku/python/lib/python3.6/smtplib.py" in connect 336. self.sock = self._get_socket(host, port, self.timeout) File "/app/.heroku/python/lib/python3.6/smtplib.py" in _get_socket 307. self.source_address) File "/app/.heroku/python/lib/python3.6/socket.py" in create_connection 724. raise err File "/app/.heroku/python/lib/python3.6/socket.py" in create_connection 713. sock.connect(sa) Exception Type: ConnectionRefusedError at /contact_form/ Exception Value: [Errno 111] Connection refused
would be better to use django-amazon-ses instead but that needed @ipmb to give the amazon user the correct perms.
django-amazon-ses
Looks like we need email configuration of some sort. Testing here:
http://unicef-rapidpro-for-health.herokuapp.com/contact-us/
This happens on form submission.