feat: update email template for Scheda Annuncio to use generic mail type and enhance subject and body

This commit is contained in:
Marco Pedone 2026-02-18 10:20:15 +01:00
parent dc859ece6f
commit e153fc9ddb
2 changed files with 7 additions and 15 deletions

View file

@ -69,7 +69,7 @@
"linter": {
"domains": {
"next": "recommended",
"project": "recommended",
"project": "none",
"react": "recommended"
},
"enabled": true,
@ -133,4 +133,4 @@
"root": "../../",
"useIgnoreFile": false
}
}
}

View file

@ -90,26 +90,18 @@ export const comunicazioniRouter = createTRPCRouter({
],
},
});
await NewMail({
template: {
mailType: "emailSchedaContatto",
mailType: "generic",
props: {
nominativo: input.nominativo,
telefono: input.numero,
indirizzo: input.indirizzo,
title: `Ricevuta invio Scheda ${input.codice} a ${input.to}`,
testo: `La scheda dell'annuncio ${input.codice} è stata inviata a ${input.to} con successo.`,
},
},
mail: {
subject: `Ric. invio Scheda ${input.codice} a ${input.to}`,
subject: `Ricevuta invio Scheda ${input.codice} a ${input.to}`,
to: "web@infoalloggi.it",
attachments: [
{
filename: `scheda annuncio ${input.codice}.pdf`,
content: base64Content,
encoding: "base64",
contentType: "application/pdf",
},
],
},
});
} catch (e) {