refactor(email): move transport to @bitbaum/mail-kit - #891
Merged
Conversation
Replace the Resend SDK singleton in src/lib/email/client.ts with the
fleet's @bitbaum/mail-kit: the module becomes a thin adapter exposing
sendEmail() (mail-kit sendMail — never throws, returns an honest
SendResult) and keeps the isEmailConfigured() name and call sites (the
placeholder-key guard now lives inside mail-kit, which also treats a
production sandbox sender as unconfigured). The three transport call
sites (notification emailService, dispatcher, seller payment
notification) now check result.sent instead of relying on the SDK
result they previously ignored — API-level failures were silently
swallowed before. Sender SSOT moves from RESEND_FROM_EMAIL to
RESEND_FROM (mail-kit env contract) with conventionalFrom('OrangeCat')
as fallback. Templates untouched. The resend dependency is removed.
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 Resend-SDK singleton transport (
src/lib/email/client.ts) with@bitbaum/mail-kit@^0.1.0:client.tsis now a thin adapter exposing a non-throwingsendEmail()and re-exportingisEmailConfigured()semantics from mail-kit (placeholder-key and production sandbox-sender both count as unconfigured), the three call sites (notification email service, dispatcher, seller payment notification) now inspect the send result instead of silently ignoring API errors, the sender SSOT moves fromRESEND_FROM_EMAILtoRESEND_FROMwithconventionalFrom("OrangeCat")as fallback, all templates are untouched, and theresenddependency is removed.🤖 Generated with Claude Code
https://claude.ai/code/session_01WqKqMnHQHSmkGFfc5t7Rxn