From eafa783040a03fc64e1f05166ae31b29da7d8989 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 10 Feb 2026 19:02:43 +0000 Subject: [PATCH] fix: use configurable RESEND_FROM_EMAIL with onboarding@resend.dev fallback Allow sending emails without custom domain by defaulting to Resend's free onboarding address. Set RESEND_FROM_EMAIL env var later when hooklab.fr domain is purchased and verified. https://claude.ai/code/session_01H2aRGDaKgarPvhay2HxN6Y --- app/api/admin/candidatures/[id]/approve/route.ts | 2 +- app/api/candidature/route.ts | 2 +- app/api/stripe/webhook/route.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/api/admin/candidatures/[id]/approve/route.ts b/app/api/admin/candidatures/[id]/approve/route.ts index 70eb610..8f771aa 100644 --- a/app/api/admin/candidatures/[id]/approve/route.ts +++ b/app/api/admin/candidatures/[id]/approve/route.ts @@ -83,7 +83,7 @@ export async function POST( const firstname = (candidature as Record).firstname as string; await resend.emails.send({ - from: "HookLab ", + from: process.env.RESEND_FROM_EMAIL || "HookLab ", to: email, subject: "Ta candidature HookLab est acceptée !", html: ` diff --git a/app/api/candidature/route.ts b/app/api/candidature/route.ts index bbf0797..554b4b1 100644 --- a/app/api/candidature/route.ts +++ b/app/api/candidature/route.ts @@ -114,7 +114,7 @@ export async function POST(request: Request) { const resend = new Resend(process.env.RESEND_API_KEY); await resend.emails.send({ - from: "HookLab ", + from: process.env.RESEND_FROM_EMAIL || "HookLab ", to: body.email, subject: "Candidature HookLab reçue !", html: ` diff --git a/app/api/stripe/webhook/route.ts b/app/api/stripe/webhook/route.ts index 12fc081..d1d5be0 100644 --- a/app/api/stripe/webhook/route.ts +++ b/app/api/stripe/webhook/route.ts @@ -126,7 +126,7 @@ export async function POST(request: Request) { const resend = new Resend(process.env.RESEND_API_KEY); await resend.emails.send({ - from: "HookLab ", + from: process.env.RESEND_FROM_EMAIL || "HookLab ", to: email, subject: "Bienvenue dans HookLab ! Tes accès sont prêts", html: `