fix(email): default RESEND_FROM_EMAIL to verified mail.cueapi.ai subdomain#95
Merged
Merged
Conversation
…omain P0 root cause: every Resend send 403'd with "Domain not verified: Verify cueapi.ai" because the from-address used the bare `cueapi.ai` domain while the only verified domain in the Resend account is the `mail.cueapi.ai` subdomain. Resend requires the from-domain to exactly match a verified domain — `cueapi.ai` ≠ `mail.cueapi.ai`. Symptom: magic-link signup emails (and failure notifications) silently failed in prod. send_email is fire-and-forget (returns False, never raises) so there was no user-facing error — signups just appeared to hang. Diagnosed via the Resend dashboard Logs (flood of 403 on POST /emails, exact error "Domain not verified: Verify cueapi.ai"). Fix: change the config default from CueAPI <noreply@cueapi.ai> (bare domain — NOT verified) to CueAPI <noreply@mail.cueapi.ai> (subdomain — verified 25d ago) This makes the default correct-by-construction so a fresh deploy or self-hoster isn't dependent on a Railway env override someone has to remember to set. The bare-domain default was a latent landmine since the audience-split work; it only bit when nothing else masked it. If a self-hoster has their OWN verified domain they still override via the RESEND_FROM_EMAIL env var as before — this only changes the default. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Parity checkThis PR modifies files tracked in
Please confirm one of the following in a reply or PR description update:
This is a soft check — it does not block merge. The goal is visibility, not friction. See HOSTED_ONLY.md for the open-core policy. |
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
Parity port of cueapi/cueapi#849. One-line config default change:
```
```
Why
Hosted-side P0: every Resend `POST /emails` 403'd with "Domain not verified: Verify cueapi.ai" because the from-address used bare `cueapi.ai` while the only verified Resend domain is the `mail.cueapi.ai` subdomain. Magic-link signup emails silently failed (send_email is fire-and-forget — no user-facing error).
Self-hosters running cueapi-core hit the same trap if they verified a subdomain in their Resend account but the default points at the bare domain. Making the default the working subdomain is correct-by-construction; self-hosters with their own verified domain still override via the `RESEND_FROM_EMAIL` env var.
Test plan
Parity impact
Tag target: next messaging-v1.1.x patch (server-only config default; no spec/wire impact).
🤖 Generated with Claude Code