From 00dcc23ac26643d8b9f651bd321c3312cbfdb15e Mon Sep 17 00:00:00 2001 From: Gk Date: Fri, 15 May 2026 21:09:21 -0700 Subject: [PATCH] fix(email): default RESEND_FROM_EMAIL to verified mail.cueapi.ai subdomain MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 (bare domain — NOT verified) to CueAPI (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) --- app/config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/config.py b/app/config.py index 5327a92..31781fe 100644 --- a/app/config.py +++ b/app/config.py @@ -47,7 +47,7 @@ class Settings(BaseSettings): BASE_URL: str = "http://localhost:8000" ALLOW_REGISTER: bool = True RESEND_API_KEY: str = "" - RESEND_FROM_EMAIL: str = "CueAPI " + RESEND_FROM_EMAIL: str = "CueAPI " WORKER_HEARTBEAT_TIMEOUT_SECONDS: int = 180 WORKER_CLAIM_TIMEOUT_SECONDS: int = 900 WORKER_UNCLAIMED_TIMEOUT_SECONDS: int = 900