Merge branch 'mail' into 'main'

mail

Closes #119

See merge request bde/nk20!270
This commit is contained in:
nicomarg 2024-09-05 20:29:30 +02:00
commit e188c5a153
2 changed files with 2 additions and 0 deletions

View File

@ -9,6 +9,7 @@ MAILTO=notekfet2020@lists.crans.org
* * * * * root cd /var/www/note_kfet && env/bin/python manage.py send_mail -c 1 -v 0
* * * * * root cd /var/www/note_kfet && env/bin/python manage.py retry_deferred -c 1 -v 0
00 0 * * * root cd /var/www/note_kfet && env/bin/python manage.py purge_mail_log 7 -v 0
00 0 * * * root cd /var/www/note_kfet && env/bin/python manage.py purge_mail_log -r failure 30 -v 0
# Faire une sauvegarde de la base de données
00 2 * * * root cd /var/www/note_kfet && apps/scripts/shell/backup_db
# Vérifier la cohérence de la base et mailer en cas de problème

View File

@ -225,6 +225,7 @@ MEDIA_URL = '/media/'
# Use mailer in production to place emails in a queue before sending them to avoid spam
EMAIL_BACKEND = 'mailer.backend.DbBackend'
MAILER_EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
MAILER_EMAIL_MAX_BATCH = 10
EMAIL_USE_SSL = os.getenv('EMAIL_USE_SSL', False)
EMAIL_HOST = os.getenv('EMAIL_HOST', 'smtp.example.org')
EMAIL_PORT = os.getenv('EMAIL_PORT', 25)