From e2f7cd0f183215a09992d0bdc60f30d54b3da47a Mon Sep 17 00:00:00 2001 From: Chris Harris Date: Wed, 25 Feb 2026 17:38:30 +0000 Subject: [PATCH 1/2] Allow SES to be used a email backend Add the configuration needed from SES. --- src/settings/base.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/settings/base.py b/src/settings/base.py index ed5b978d7..260414eef 100644 --- a/src/settings/base.py +++ b/src/settings/base.py @@ -538,7 +538,11 @@ def setup_celery_logging(**kwargs): EMAIL_HOST_PASSWORD = os.environ.get('EMAIL_HOST_PASSWORD') EMAIL_PORT = os.environ.get('EMAIL_PORT', 587) EMAIL_USE_TLS = os.environ.get('EMAIL_USE_TLS', True) +AWS_DEFAULT_REGION = os.environ.get('AWS_DEFAULT_REGION') +AWS_SES_REGION_NAME = os.environ.get('AWS_SES_REGION_NAME', AWS_DEFAULT_REGION) SERVER_EMAIL = os.environ.get('SERVER_EMAIL', 'noreply@codabench.org') +# Default from email to SERVER_EMAIL if not set, as some email backends require a from email to be set +DEFAULT_FROM_EMAIL = os.environ.get('DEFAULT_FROM_EMAIL', SERVER_EMAIL) CONTACT_EMAIL = os.environ.get('CONTACT_EMAIL', 'info@codabench.org') From 8903a0c326c507206856dbdfde7194c9659bc3bd Mon Sep 17 00:00:00 2001 From: Chris Harris Date: Wed, 25 Feb 2026 19:37:25 +0000 Subject: [PATCH 2/2] Separate out DEFAULT_FROM_EMAIL from SERVER_EMAIL --- src/settings/base.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/settings/base.py b/src/settings/base.py index 260414eef..4adeb3dbd 100644 --- a/src/settings/base.py +++ b/src/settings/base.py @@ -541,8 +541,7 @@ def setup_celery_logging(**kwargs): AWS_DEFAULT_REGION = os.environ.get('AWS_DEFAULT_REGION') AWS_SES_REGION_NAME = os.environ.get('AWS_SES_REGION_NAME', AWS_DEFAULT_REGION) SERVER_EMAIL = os.environ.get('SERVER_EMAIL', 'noreply@codabench.org') -# Default from email to SERVER_EMAIL if not set, as some email backends require a from email to be set -DEFAULT_FROM_EMAIL = os.environ.get('DEFAULT_FROM_EMAIL', SERVER_EMAIL) +DEFAULT_FROM_EMAIL = os.environ.get('DEFAULT_FROM_EMAIL', 'noreply@codabench.org') CONTACT_EMAIL = os.environ.get('CONTACT_EMAIL', 'info@codabench.org')