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
This commit is contained in:
@@ -83,7 +83,7 @@ export async function POST(
|
||||
const firstname = (candidature as Record<string, unknown>).firstname as string;
|
||||
|
||||
await resend.emails.send({
|
||||
from: "HookLab <noreply@hooklab.fr>",
|
||||
from: process.env.RESEND_FROM_EMAIL || "HookLab <onboarding@resend.dev>",
|
||||
to: email,
|
||||
subject: "Ta candidature HookLab est acceptée !",
|
||||
html: `
|
||||
|
||||
@@ -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 <noreply@hooklab.fr>",
|
||||
from: process.env.RESEND_FROM_EMAIL || "HookLab <onboarding@resend.dev>",
|
||||
to: body.email,
|
||||
subject: "Candidature HookLab reçue !",
|
||||
html: `
|
||||
|
||||
@@ -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 <noreply@hooklab.fr>",
|
||||
from: process.env.RESEND_FROM_EMAIL || "HookLab <onboarding@resend.dev>",
|
||||
to: email,
|
||||
subject: "Bienvenue dans HookLab ! Tes accès sont prêts",
|
||||
html: `
|
||||
|
||||
Reference in New Issue
Block a user