Make SMTP port and TLS configurable

This commit is contained in:
Kyle Lacy 2023-04-15 11:36:23 -07:00
parent 8638170a98
commit 3913cf571f
No known key found for this signature in database
GPG Key ID: 82616D2392FB6605

View File

@ -174,11 +174,11 @@ EMAIL_BACKEND = "django.core.mail.backends.smtp.EmailBackend"
# Host for sending e-mail. # Host for sending e-mail.
EMAIL_HOST = os.environ.get("EMAIL_HOST") EMAIL_HOST = os.environ.get("EMAIL_HOST")
# Port for sending e-mail. # Port for sending e-mail.
EMAIL_PORT = 587 EMAIL_PORT = int(os.environ.get("EMAIL_PORT", 587))
# Optional SMTP authentication information for EMAIL_HOST. # Optional SMTP authentication information for EMAIL_HOST.
EMAIL_HOST_USER = os.environ.get("EMAIL_HOST_USER") EMAIL_HOST_USER = os.environ.get("EMAIL_HOST_USER")
EMAIL_HOST_PASSWORD = os.environ.get("EMAIL_HOST_PASSWORD") EMAIL_HOST_PASSWORD = os.environ.get("EMAIL_HOST_PASSWORD")
EMAIL_USE_TLS = True EMAIL_USE_TLS = os.environ.get("EMAIL_USE_TLS", "1") == "1"
SIMPLE_JWT = { SIMPLE_JWT = {