Skip to content

Commit

Permalink
Add option for file-based email backend
Browse files Browse the repository at this point in the history
  • Loading branch information
mattcen committed Mar 27, 2024
1 parent 5e571ca commit da956fe
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ ALLOWED_HOSTS=*

# By default, emails get sent to the local console
#EMAIL_BACKEND=django.core.mail.backends.console.EmailBackend
#EMAIL_BACKEND=django.core.mail.backends.filebased.EmailBackend
#EMAIL_FILE_PATH = "/tmp/django-messages"
# To set up an SMTP server, set the following (only EMAIL_BACKEND is required)
#EMAIL_BACKEND=django.core.mail.backends.smtp.EmailBackend
#EMAIL_HOST=mail
Expand Down
1 change: 1 addition & 0 deletions django/myproject/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,5 +184,6 @@
EMAIL_SSL_CERTFILE = env("EMAIL_SSL_CERTFILE", default=None)
DEFAULT_FROM_EMAIL = env("DEFAULT_FROM_EMAIL", default="webmaster@localhost")
SERVER_EMAIL = env("SERVER_EMAIL", default=DEFAULT_FROM_EMAIL)
EMAIL_FILE_PATH = env("EMAIL_FILE_PATH", default="/tmp/django-messages")

ADMINS = email.utils.getaddresses(["To: %s" % (env("ADMINS", default=""))])

0 comments on commit da956fe

Please sign in to comment.