Configure email server
This commit is contained in:
parent
403002812e
commit
bef8bf0ee7
1 changed files with 11 additions and 0 deletions
|
|
@ -166,6 +166,17 @@ LOCALE_PATHS = [os.path.join(BASE_DIR, 'photo21/locale')]
|
|||
|
||||
FIXTURE_DIRS = [os.path.join(BASE_DIR, 'note_kfet/fixtures')]
|
||||
|
||||
# Email settings
|
||||
if DEBUG:
|
||||
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
|
||||
else:
|
||||
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
|
||||
EMAIL_USE_SSL = os.getenv('EMAIL_USE_SSL', False)
|
||||
EMAIL_HOST = os.getenv('EMAIL_HOST', 'smtp.crans.org')
|
||||
EMAIL_PORT = os.getenv('EMAIL_PORT', 25)
|
||||
EMAIL_HOST_USER = os.getenv('EMAIL_USER', None)
|
||||
EMAIL_HOST_PASSWORD = os.getenv('EMAIL_PASSWORD', None)
|
||||
|
||||
# Mail will be sent from this address
|
||||
SERVER_EMAIL = "photos@crans.org"
|
||||
DEFAULT_FROM_EMAIL = f"Serveur photos <{SERVER_EMAIL}>"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue