Skip to content

Commit

Permalink
Improve SMTP settings
Browse files Browse the repository at this point in the history
- Add ALEPH_MAIL_TLS option;
- Remove unused ALEPH_MAIL_ADMIN option from aleph.env.tmpl;
- Set default in aleph.env.tmpl to TLS, not SSL.
  • Loading branch information
jpilet committed Dec 2, 2019
1 parent a9c6b2f commit 04043f3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 3 additions & 2 deletions aleph.env.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,12 @@ ALEPH_OCR_DEFAULTS=eng
# Provide a valid email to send alerts from:
ALEPH_MAIL_FROM=
ALEPH_MAIL_HOST=
ALEPH_MAIL_ADMIN=
ALEPH_MAIL_USERNAME=
ALEPH_MAIL_PASSWORD=
ALEPH_MAIL_PORT=25
ALEPH_MAIL_USE_TLS=false
ALEPH_MAIL_TLS=true
ALEPH_MAIL_SSL=false
ALEPH_MAIL_DEBUG=false

# Debug mode (insecure)
ALEPH_DEBUG=false
Expand Down
4 changes: 3 additions & 1 deletion aleph/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,10 @@
MAIL_SERVER = env.get('ALEPH_MAIL_HOST', 'localhost')
MAIL_USERNAME = env.get('ALEPH_MAIL_USERNAME')
MAIL_PASSWORD = env.get('ALEPH_MAIL_PASSWORD')
MAIL_USE_SSL = env.to_bool('ALEPH_MAIL_SSL', True)
MAIL_USE_SSL = env.to_bool('ALEPH_MAIL_SSL', False)
MAIL_USE_TLS = env.to_bool('ALEPH_MAIL_TLS', True)
MAIL_PORT = env.to_int('ALEPH_MAIL_PORT', 465)
MAIL_DEBUG = env.to_bool('ALEPH_MAIL_DEBUG', DEBUG)


###############################################################################
Expand Down

0 comments on commit 04043f3

Please sign in to comment.