Skip to content

Conversation

@nthriveni-sonata-ship-it

This PR introduces a waffle-flag–controlled routing for Account Activation emails to be sent via SES.

What’s included:

Added a waffle flag to control SES routing for account activation emails

Updated activation email composition to override the default ACE channel to django_email when the flag is enabled

Local devstack validation using a file-based email backend to verify channel override and email generation

Testing:

Verified waffle flag behavior locally via Django admin

Confirmed ACE message options include transactional and django_email channel override

Validated rendered email output using the file-based email backend

Next steps:
– Draft PR for early review and alignment

@nthriveni-sonata-ship-it nthriveni-sonata-ship-it force-pushed the feature/account-activation-ses-routing branch from c9a9d9a to a363016 Compare January 23, 2026 05:46
language=preferences_api.get_user_preference(user, LANGUAGE_KEY),
user_context=message_context,
)
if ENABLE_SES_FOR_ACCOUNT_ACTIVATION.is_enabled():

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @nthriveni-sonata-ship-it, couple of suggestions on refactor:

  1. Centralize the Routing Logic
    Currently, the SES routing logic is tied specifically to the management view. To ensure it also works for initial registrations (via Celery tasks) and user-requested resends, we should pull the logic into a centralized utility.
    Action: Move the WaffleFlag definitions and the check logic to: openedx/core/djangoapps/ace_common/utils.py

  2. Implement an Active Fallback (Safe-to-Fail) in openedx/core/djangoapps/user_authn/tasks.py
    The current implementation introduces a single point of failure. If the Waffle flag is ON but the SES backend (django_email) is unreachable, the email will never be sent. We should prioritize SES but fallback to the default ACE path if it fails.

Why?
One function handles routing for all activation/course-update flows.
Even if SES has an outage, user registrations won't be blocked.
Management views and Celery tasks don't need to know the names of individual Waffle flags.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants