Remove Sparkpost email validation in favor of SES Auto Validation#8826
Merged
Remove Sparkpost email validation in favor of SES Auto Validation#8826
Conversation
SES Auto Validation now handles email address validation at the infrastructure level before delivery, making the app-level Sparkpost recipient validation redundant. This removes the VerifyEmail command, its call sites (bootstrap + email change), and the email_status_invalid gate from may_receive_emails?. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Keep blocking emails to addresses previously marked invalid by Sparkpost, but allow sending to unverified addresses (which all new users will now have since we no longer proactively validate). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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
User::VerifyEmailcommand that called the Sparkpost Recipient Validation API to check email addresses on signup/email changereverify_email!method and itsafter_update_committrigger from the User modelemail_status_invalid?gate frommay_receive_emails?since SES Auto Validation handles suppression at the infrastructure leveluser_data.email_statuscolumn and enum (dormant), and the existing SPI bounce/complaint unsubscribe endpointContext
AWS SES now offers Auto Validation, which automatically validates every outbound email address before delivery at the infrastructure level. Once enabled via Terraform, invalid addresses are suppressed before delivery — no application-level pre-validation needed.
Terraform follow-up: Enable SES Auto Validation via
PutAccountSuppressionAttributeswithValidationOptions.ConditionThresholdset toENABLEDandOverallConfidenceThreshold.Verdictset toMANAGED. Thesparkpost_api_keysecret can then be removed from infrastructure config.Test plan
🤖 Generated with Claude Code