Skip to content

fix(email): default RESEND_FROM_EMAIL to verified mail.cueapi.ai subdomain#95

Merged
govindkavaturi-art merged 1 commit into
mainfrom
fix/resend-from-verified-subdomain
May 16, 2026
Merged

fix(email): default RESEND_FROM_EMAIL to verified mail.cueapi.ai subdomain#95
govindkavaturi-art merged 1 commit into
mainfrom
fix/resend-from-verified-subdomain

Conversation

@govindkavaturi-art
Copy link
Copy Markdown
Member

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

  • config.py syntax OK
  • Single default-string change, no logic touched
  • Mirrors cueapi/cueapi#849 exactly

Parity impact

  • cueapi (hosted) — cueapi/cueapi#849
  • cueapi-core (this PR)
  • Other packages — N/A (server-side email config only)

Tag target: next messaging-v1.1.x patch (server-only config default; no spec/wire impact).

🤖 Generated with Claude Code

…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>
@github-actions
Copy link
Copy Markdown

Parity check

This PR modifies files tracked in parity-manifest.json:

  • app/config.py

Please confirm one of the following in a reply or PR description update:

  1. The equivalent change has been applied to the private cueapi monorepo. Link the PR.
  2. This change is OSS-only and does not need porting. Briefly explain why (e.g. "fixes a bug that only exists in the OSS build").
  3. A follow-up issue has been filed to port the reverse direction. Link the issue.

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.

@govindkavaturi-art govindkavaturi-art enabled auto-merge (squash) May 16, 2026 04:15
@govindkavaturi-art govindkavaturi-art merged commit 2c76126 into main May 16, 2026
6 checks passed
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.

1 participant