From 29ac82a91b81e443c860074cda5618600e132693 Mon Sep 17 00:00:00 2001 From: Nicholas Bentley Date: Tue, 18 Aug 2020 23:34:20 -0400 Subject: [PATCH] smtp ssl/tls fix --- TEMPLATE.env | 5 ++++- shynet/shynet/settings.py | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/TEMPLATE.env b/TEMPLATE.env index 0a5c2d5..763861a 100644 --- a/TEMPLATE.env +++ b/TEMPLATE.env @@ -14,7 +14,10 @@ EMAIL_HOST_USER=example EMAIL_HOST_PASSWORD=example_password EMAIL_HOST=smtp.example.com EMAIL_PORT=465 -SERVER_EMAIL= noreply@shynet.example.com +EMAIL_USE_SSL=True +# Comment out EMAIL_USE_SSL & uncomment EMAIL_USE_TLS if your SMTP server uses TLS. +# EMAIL_USE_TLS=True +SERVER_EMAIL=Shynet # General Django settings DJANGO_SECRET_KEY=random_string diff --git a/shynet/shynet/settings.py b/shynet/shynet/settings.py index 59cdbcd..b2abb10 100644 --- a/shynet/shynet/settings.py +++ b/shynet/shynet/settings.py @@ -279,7 +279,8 @@ else: EMAIL_PORT = int(os.environ.get("EMAIL_PORT", 465)) EMAIL_HOST_USER = os.environ.get("EMAIL_HOST_USER") EMAIL_HOST_PASSWORD = os.environ.get("EMAIL_HOST_PASSWORD") - EMAIL_USE_SSL = True + EMAIL_USE_SSL = os.environ.get("EMAIL_USE_SSL") + EMAIL_USE_TLS = os.environ.get("EMAIL_USE_TLS") # NPM