smtp ssl/tls fix

This commit is contained in:
Nicholas Bentley 2020-08-18 23:34:20 -04:00
parent fecea17a9d
commit 29ac82a91b
2 changed files with 6 additions and 2 deletions

View File

@ -14,7 +14,10 @@ EMAIL_HOST_USER=example
EMAIL_HOST_PASSWORD=example_password EMAIL_HOST_PASSWORD=example_password
EMAIL_HOST=smtp.example.com EMAIL_HOST=smtp.example.com
EMAIL_PORT=465 EMAIL_PORT=465
SERVER_EMAIL=<Shynet> 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 <noreply@shynet.example.com>
# General Django settings # General Django settings
DJANGO_SECRET_KEY=random_string DJANGO_SECRET_KEY=random_string

View File

@ -279,7 +279,8 @@ else:
EMAIL_PORT = int(os.environ.get("EMAIL_PORT", 465)) EMAIL_PORT = int(os.environ.get("EMAIL_PORT", 465))
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_SSL = True EMAIL_USE_SSL = os.environ.get("EMAIL_USE_SSL")
EMAIL_USE_TLS = os.environ.get("EMAIL_USE_TLS")
# NPM # NPM