Skip to content

feat: switch email provider from Brevo to Amazon SES#6758

Open
dmetzner wants to merge 3 commits intomainfrom
feature/6719-switch-to-amazon-ses
Open

feat: switch email provider from Brevo to Amazon SES#6758
dmetzner wants to merge 3 commits intomainfrom
feature/6719-switch-to-amazon-ses

Conversation

@dmetzner
Copy link
Copy Markdown
Collaborator

Summary

Closes #6719

  • Replace symfony/brevo-mailer with symfony/amazon-mailer — supports ses+smtp:// transport DSN
  • Raise EmailBudgetManager::DAILY_LIMIT from 300 → 5,000 with proportional type reserves (verification: 2500, reset: 500, consent: 500, admin: 750, management: 750)
  • Remove local DKIM signing code from MailerAdapter — SES handles DKIM natively via DNS CNAME records
  • Remove dkim.private.key parameter from config/services.php and .dkim/private.key from deploy.php shared files
  • Clean up stale Psalm baseline entry for removed DKIM code

Before deploying (manual steps)

  1. AWS Setup: Create IAM user with SES-only permissions, verify catrob.at domain, request production access
  2. DNS: Add SES DKIM CNAME records (3), update SPF to include SES, verify DMARC
  3. Prod secrets: Set MAILER_DSN=ses+smtp://ACCESS_KEY:SECRET_KEY@default?region=eu-central-1 in .env.prod.local
  4. AWS Budget: Set alert at $15/month, SES sending quota at 5,000/day

Test plan

  • bin/phpunit --filter EmailBudgetManagerTest — all 12 tests pass with updated limits
  • Psalm passes (stale baseline entry removed)
  • CI static analysis + unit tests green
  • After deploy: send test emails from staging, verify deliverability to Gmail/Outlook/Yahoo
  • Monitor SES bounce/complaint rates in AWS console

🤖 Generated with Claude Code

dmetzner and others added 3 commits April 19, 2026 14:53
Replace symfony/brevo-mailer with symfony/amazon-mailer to support
1,000+ daily registrations (Brevo free tier capped at 300 emails/day).
Raise EmailBudgetManager daily limit from 300 to 5,000 with proportional
type reserves. Remove local DKIM signing code since SES handles DKIM
natively via DNS. Remove .dkim/private.key from deploy shared files.

Closes #6719

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace hardcoded 300 with EmailBudgetManager::DAILY_LIMIT so the test
adapts to budget limit changes.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace hardcoded 150/140 with EmailBudgetManager::TYPE_RESERVES so the
test adapts when reserve values change (was breaking after SES migration
raised verification reserve from 150 to 2500).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@dmetzner dmetzner force-pushed the feature/6719-switch-to-amazon-ses branch from a5d55ad to 37929c2 Compare April 19, 2026 12:54
Copy link
Copy Markdown

@Saurabhtbj1201 Saurabhtbj1201 left a comment

Choose a reason for hiding this comment

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

ok

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.

Switch email provider from Brevo to Amazon SES

2 participants