aboutsummaryrefslogtreecommitdiffstats
path: root/config/settings/local.py
diff options
context:
space:
mode:
authorMatthew Lemon <y@yulqen.org>2024-12-04 17:11:55 +0000
committerMatthew Lemon <y@yulqen.org>2024-12-04 17:11:55 +0000
commit7cd2fd2b75bc5597e9b2a128bf61201910be6df2 (patch)
tree411c26f821129f196b2a38863a34b05e4e8388e9 /config/settings/local.py
parent4b21e3889e8337fa5bc9e58cdfc61a9f2019adc9 (diff)
Email verification
- Associated changes in the .env file now allow us to test the SMTP server config - Added mine and J's email ad admins - Grab env variables from the .env file in the local.py file for testing purposes - Set an expiry of 24hrs for the validation link to work - Added an HTML version of the verification email
Diffstat (limited to '')
-rw-r--r--config/settings/local.py15
1 files changed, 13 insertions, 2 deletions
diff --git a/config/settings/local.py b/config/settings/local.py
index 155b219..0e4b7e4 100644
--- a/config/settings/local.py
+++ b/config/settings/local.py
@@ -29,9 +29,20 @@ CACHES = {
# EMAIL
# ------------------------------------------------------------------------------
# https://docs.djangoproject.com/en/dev/ref/settings/#email-host
-EMAIL_HOST = env("EMAIL_HOST", default="mailpit")
+# EMAIL_HOST = env("EMAIL_HOST", default="mailpit")
# https://docs.djangoproject.com/en/dev/ref/settings/#email-port
-EMAIL_PORT = 1025
+# EMAIL_PORT = 1025
+
+DEFAULT_FROM_EMAIL = env(
+ "DJANGO_DEFAULT_FROM_EMAIL",
+ default="alphabetlearning.online <help@alphabetlearning.online>",
+)
+SERVER_EMAIL = env("DJANGO_SERVER_EMAIL", default=DEFAULT_FROM_EMAIL)
+EMAIL_HOST = env('EMAIL_HOST')
+EMAIL_PORT = env('EMAIL_PORT')
+EMAIL_HOST_USER = env('EMAIL_HOST_USER')
+EMAIL_HOST_PASSWORD = env('EMAIL_HOST_PASSWORD')
+EMAIL_USE_TLS = env.bool('EMAIL_USE_TLS', default=True)
# WhiteNoise
# ------------------------------------------------------------------------------