Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add explicit setting for "no email security" #402

Merged
merged 1 commit into from
May 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion install/get-teamware.sh
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ else

case "$EMAIL_SECURE" in
[Nn]*)
DJANGO_EMAIL_SECURITY=
DJANGO_EMAIL_SECURITY=none
;;

*)
Expand Down
4 changes: 3 additions & 1 deletion teamware/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,8 +214,10 @@
EMAIL_USE_SSL = True
elif os.environ['DJANGO_EMAIL_SECURITY'].lower() == 'tls':
EMAIL_USE_TLS = True
elif os.environ['DJANGO_EMAIL_SECURITY'].lower() in ['', 'none']:
pass
else:
raise ValueError("DJANGO_EMAIL_SECURITY, if set, must be either SSL or TLS")
raise ValueError("DJANGO_EMAIL_SECURITY, if set, must be either SSL or TLS, or 'none' for no security")

if 'DJANGO_EMAIL_CLIENT_CERTIFICATE' in os.environ:
# If certificate is set then key must also, and we want to raise an
Expand Down
Loading