Commit 61c91c16 authored by Robert's avatar Robert

Add django mailer for production

parent b239998c
Pipeline #687 passed with stage
in 10 minutes and 6 seconds
......@@ -9,3 +9,7 @@
# import content from external websites
46 * * * * root stadtctl import_feeds
# send mails with django-mailer
* * * * * root stadtctl send_mail >>/var/lib/stadtgestalten/mailer.log 2>&1
9,29,49 * * * * root stadtctl retry_deferred >>/var/lib/stadtgestalten/mailer.log 2>&1
......@@ -5,6 +5,7 @@ django-crispy-forms # debian: python3-django-crispy-forms
django-filter # debian: python3-django-filters
django-ical # NOT IN DEBIAN
django-mailbox # NOT IN DEBIAN
django-mailer # NOT IN DEBIAN
djangorestframework # debian: python-djangorestframework
flake8 # debian: flake8
feedparser # debian: python3-feedparser
......
......@@ -47,6 +47,7 @@ INSTALLED_APPS = [
'features.subscriptions',
'features.tags',
'features.texts',
'mailer',
'rest_framework',
'rules.apps.AutodiscoverRulesConfig',
'sorl.thumbnail',
......@@ -185,7 +186,8 @@ ACCOUNT_EMAIL_SUBJECT_PREFIX = ''
DEFAULT_FROM_EMAIL = 'noreply@localhost'
DEFAULT_REPLY_TO_EMAIL = 'stadtgestalten+{reply_key}@localhost'
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
EMAIL_BACKEND = 'mailer.backend.DbBackend'
MAILER_EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
# Sites
......
......@@ -10,3 +10,7 @@ THUMBNAIL_DEBUG = DEBUG
# required by sorl-thumbnail.
TEMPLATE_DEBUG = DEBUG
TEMPLATES[0]["OPTIONS"]["debug"] = DEBUG
# Email
# https://docs.djangoproject.com/en/1.9/topics/email/
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment