feat: add SES routing for account activation emails with fallback support#207
Draft
nthriveni-sonata-ship-it wants to merge 1 commit intoedx:release-ulmofrom
Conversation
4aeff43 to
d52602d
Compare
d52602d to
83ef742
Compare
jsnwesson
reviewed
Apr 8, 2026
Comment on lines
+81
to
+92
| if route_via_ses: | ||
| msg.options.update({ | ||
| 'override_default_channel': 'django_email', | ||
| 'transactional': True, | ||
| 'from_address': configuration_helpers.get_value( | ||
| 'ACTIVATION_EMAIL_FROM_ADDRESS' | ||
| ) or configuration_helpers.get_value( | ||
| 'email_from_address', | ||
| settings.DEFAULT_FROM_EMAIL | ||
| ), | ||
| }) | ||
|
|
Member
There was a problem hiding this comment.
I have a very naive question: what happens if there is no Braze campaign ID in edx-internal? Would edx-ace know to default to django_email? Or did we still need to explicitly define this as a transactional email in order for AWS SES to be used?
Member
There was a problem hiding this comment.
I made this comment and then immediately realized that we do want to default back to using Braze if AWS SES fails. Can you point to where that's happening in the code exactly?
| ) | ||
| return | ||
|
|
||
| _remove_ses_overrides(msg) |
Member
Author
There was a problem hiding this comment.
fallback happens in the except RecoverableChannelDeliveryError block.
Specifically:
- We remove SES overrides via
_remove_ses_overrides(msg) - Then call
ace.send(msg)again
That second ace.send(msg) routes via the default ACE channel (Braze).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds feature-flagged SES routing for account activation emails with a safe fallback mechanism.
Changes
Behavior
Testing