From 77e5544a906fd9cca20bb5c7f7d538798483392f Mon Sep 17 00:00:00 2001 From: Manus Date: Thu, 26 Feb 2026 09:42:34 -0500 Subject: [PATCH] =?UTF-8?q?Checkpoint:=20Correction=20du=20bug=20d'importa?= =?UTF-8?q?tion=20des=20invitations=20Outlook=20(ICS)=20-=20ajout=20de=20l?= =?UTF-8?q?'encodage=20UTF-8=20explicite=20et=20des=20en-t=C3=AAtes=20corr?= =?UTF-8?q?ects=20pour=20les=20pi=C3=A8ces=20jointes=20calendrier?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/emailService.ts | 6 +++--- todo.md | 8 ++++++++ 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/server/emailService.ts b/server/emailService.ts index f7caccd..aeda437 100644 --- a/server/emailService.ts +++ b/server/emailService.ts @@ -109,7 +109,7 @@ export async function sendInscriptionConfirmation(params: { // Générer une invitation ICS pour chaque date const attachments = isConfirmed ? params.dates.map((date, index) => ({ filename: `invitation_date_${date.ordre}.ics`, - content: generateFormationICS({ + content: Buffer.from(generateFormationICS({ formationNom: params.formationNom, sessionNom: `${params.sequenceNom} - Date ${date.ordre}`, dateDebut: date.dateDebut, @@ -118,8 +118,8 @@ export async function sendInscriptionConfirmation(params: { apprenantNom: params.apprenantNom, apprenantPrenom: params.apprenantPrenom, apprenantEmail: params.apprenantEmail, - }), - contentType: 'text/calendar', + }), 'utf-8'), + contentType: 'text/calendar; charset=utf-8; method=REQUEST', })) : undefined; // Préparer les variables pour le remplacement (avec alias pour compatibilité) diff --git a/todo.md b/todo.md index 0397629..71d0b59 100644 --- a/todo.md +++ b/todo.md @@ -1662,4 +1662,12 @@ - [x] Ajouter la vérification du paramètre notificationsActives avant chaque envoi (3 endroits) - [x] Mettre à jour la description du paramètre dans l'interface admin pour clarifier son rôle - [x] Déployer sur TEST pour validation +- [x] Déployer sur PROD + +## BUG - Invitations Outlook (ICS) ne s'ouvrent pas + +- [x] Analyser le fichier ICS fourni (encodage incorrect) +- [x] Corriger l'encodage UTF-8 et les en-têtes dans emailService.ts +- [ ] Tester avec Outlook pour valider l'importation +- [x] Déployer sur TEST - [ ] Déployer sur PROD