refactor(email): SES -> @bitbaum/mail-kit; drop @aws-sdk/client-ses - #178
Merged
Conversation
The playbook expected no SES call sites, but lib/email/service.ts is live
(consultations route sends welcome + admin mails through it), so a bare dep
removal would have broken the build. Instead the transport is swapped to the
fleet's mail layer:
- EmailService now sends via @bitbaum/mail-kit sendMail; the throw-on-failure
contract is preserved for the catching caller
- Sender comes from RESEND_FROM (fleet SSOT) with conventionalFrom('Botsmann')
fallback; FROM_EMAIL and NEXT_AWS_* reads deleted from email config paths
- @aws-sdk/client-ses removed; tests mock @bitbaum/mail-kit instead of SES,
with a new failed-send assertion
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WqKqMnHQHSmkGFfc5t7Rxn
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.
Replaces the AWS SES transport in lib/email/service.ts with @bitbaum/mail-kit (Resend, fleet env SSOT RESEND_FROM with the conventional fleet sender as fallback) and removes the @aws-sdk/client-ses dependency. Note: the sweep playbook called for a bare dep removal claiming no call sites, but EmailService is live in the consultations API route — removing the dep alone would not build, so the transport was migrated instead; templates, method signatures and the throw-on-failure contract are unchanged, dead NEXT_AWS_*/FROM_EMAIL config reads are deleted, and the email tests now mock mail-kit (plus a new failed-send case).
🤖 Generated with Claude Code