diff --git a/.env.example b/.env.example index e465126..fc08aa3 100644 --- a/.env.example +++ b/.env.example @@ -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 diff --git a/django/myproject/settings.py b/django/myproject/settings.py index 1540c6d..85d171b 100644 --- a/django/myproject/settings.py +++ b/django/myproject/settings.py @@ -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=""))])