mirror of
https://gitlab.com/animath/si/plateforme.git
synced 2024-12-24 03:02:23 +00:00
Use mailer to send mails
This commit is contained in:
parent
f2b498c352
commit
b7cb5aa776
@ -5,6 +5,7 @@ django-bootstrap-datepicker-plus
|
||||
django-crispy-forms
|
||||
django-extensions
|
||||
django-filter
|
||||
django-mailer
|
||||
django-polymorphic
|
||||
django-tables2
|
||||
djangorestframework
|
||||
|
@ -51,10 +51,11 @@ INSTALLED_APPS = [
|
||||
'django.forms',
|
||||
|
||||
'bootstrap_datepicker_plus',
|
||||
'django_extensions',
|
||||
'polymorphic',
|
||||
'crispy_forms',
|
||||
'django_extensions',
|
||||
'django_tables2',
|
||||
'mailer',
|
||||
'polymorphic',
|
||||
'rest_framework',
|
||||
'rest_framework.authtoken',
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
# Database
|
||||
# https://docs.djangoproject.com/en/3.0/ref/settings/#databases
|
||||
|
||||
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
|
||||
EMAIL_BACKEND = 'mailer.backend.DbBackend'
|
||||
MAILER_EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
|
||||
|
@ -9,7 +9,8 @@ ALLOWED_HOSTS = ['inscription.tfjm.org', 'plateforme.tfjm.org']
|
||||
SECRET_KEY = os.environ.get('DJANGO_SECRET_KEY', 'CHANGE_ME_IN_ENV_SETTINGS')
|
||||
|
||||
# Emails
|
||||
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
|
||||
EMAIL_BACKEND = 'mailer.backend.DbBackend'
|
||||
MAILER_EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
|
||||
EMAIL_USE_SSL = True
|
||||
EMAIL_HOST = os.getenv("SMTP_HOST")
|
||||
EMAIL_PORT = os.getenv("SMTP_PORT")
|
||||
|
Loading…
Reference in New Issue
Block a user