Allinea il flusso contatti a info support no-reply

Completa il routing reparto con account support e aggiorna documentazione/env per usare info come fallback e no-reply come mittente tecnico.

Made-with: Cursor
This commit is contained in:
Javaxman
2026-04-24 11:36:58 +02:00
parent 70759d6c1c
commit 6ca0256bf7
4 changed files with 14 additions and 4 deletions

View File

@ -55,6 +55,7 @@ export const cta = {
fieldMessage: 'message',
departmentOptions: [
{ value: 'general', label: 'Generale' },
{ value: 'support', label: 'Support' },
{ value: 'privacy', label: 'Privacy / DPO' },
{ value: 'security', label: 'Security / Incident Response' },
{ value: 'ethics', label: 'Segnalazioni confidenziali (Ethics)' },

View File

@ -82,6 +82,7 @@ async function sendWithResend(apiKey: string, fromEmail: string, toEmail: string
function resolveDepartmentRecipient(runtimeEnv: RuntimeEnv, defaultRecipient: string, department: string): string {
const normalized = department.trim().toLowerCase();
const map: Record<string, string> = {
support: readEnv('CONTACT_FORM_TO_EMAIL_SUPPORT', runtimeEnv),
privacy: readEnv('CONTACT_FORM_TO_EMAIL_PRIVACY', runtimeEnv),
security: readEnv('CONTACT_FORM_TO_EMAIL_SECURITY', runtimeEnv),
ethics: readEnv('CONTACT_FORM_TO_EMAIL_ETHICS', runtimeEnv),