HOLD MERGE — api brand email → @recoupable.dev (+ inbound @mail.recoupable.dev)

Merged
SW
4mo ago
+35-38

⚠️ HOLD MERGE

Do not merge until BOTH are ready: (1) recoupable.dev is a verified sending domain in Resend, and (2) MX/inbound on mail.recoupable.dev is live. Otherwise outbound bounces and inbound replies stop arriving. Per recoupable/chat#1819 decision (2026-06-29).

What

  • lib/const.ts — OUTBOUND_EMAIL_DOMAIN → @recoupable.dev (so RECOUP_FROM_EMAIL = agent@recoupable.dev); INBOUND_EMAIL_DOMAIN → @mail.recoupable.dev.
  • lib/composio/toolRouter/getSharedAccountConnections.ts — shared@ → .dev.
  • lib/emails/isTestEmail.ts — sidney@ → .dev.
  • lib/sandbox/resolveGitUser.ts — noreply @users.noreply.recoupable.com → .dev.
  • lib/emails/inbound/getFromWithName.ts, lib/emails/sendEmailHandler.ts, app/api/emails/route.ts — from-address JSDoc → .dev.
  • Tests updated to the new domains: getFromWithName.test.ts, processAndSendEmail.test.ts, resolveGitUser.test.ts.

Verification

vitest run lib/emails lib/sandbox lib/composio app/api/emails: 613 passed / 98 files (includes the updated domain assertions).

Coupled follow-up

When this merges (the real from-address becomes agent@recoupable.dev), the docs accounts.json send_email from-address examples should flip too — see docs#256 note.

🤖 Generated with Claude Code


Summary by cubic

Switch all email to the apex @recoupable.dev for both outbound and inbound. Updates constants, API handler docs, inbound address parsing, sandbox git-user fallback, and tests; default from is now Agent by Recoup agent@recoupable.dev.

  • Migration
    • After merge, update docs accounts.json send_email examples to agent@recoupable.dev.