From 192ae462dee3d612d1154371f47cc5d0ad3f5544 Mon Sep 17 00:00:00 2001 From: alma Date: Mon, 21 Apr 2025 16:31:07 +0200 Subject: [PATCH] mail page fix --- app/courrier/page.tsx | 42 +++++++++++++++--------------------------- 1 file changed, 15 insertions(+), 27 deletions(-) diff --git a/app/courrier/page.tsx b/app/courrier/page.tsx index d9c4ec4a..a7483d4d 100644 --- a/app/courrier/page.tsx +++ b/app/courrier/page.tsx @@ -432,37 +432,24 @@ function getReplyBody(email: Email | null, type: 'reply' | 'replyAll' | 'forward const subject = email.subject || '(No subject)'; if (type === 'forward') { - if (isHtml) { - return `---------- Forwarded message ---------
-From: ${from}
-Date: ${formattedDate}
-Subject: ${subject}
-To: ${email.to}
-
-${content}`; - } else { - return `---------- Forwarded message --------- + return `---------- Forwarded message --------- From: ${from} Date: ${formattedDate} Subject: ${subject} To: ${email.to} ${content}`; - } } else { if (isHtml) { - return `

-
- - -
`; + // For HTML content, wrap each line in a blockquote + const quotedHtml = content + .split('\n') + .map(line => `
${line}
`) + .join('\n'); + + return `\n\nOn ${formattedDate}, ${from} wrote:\n${quotedHtml}`; } else { - return `\n\nOn ${formattedDate}, ${from} wrote: -> ${content.split('\n').join('\n> ')}`; + return `\n\nOn ${formattedDate}, ${from} wrote:\n> ${content.split('\n').join('\n> ')}`; } } } catch (error) { @@ -1780,12 +1767,13 @@ export default function CourrierPage() { {/* Message Body */}
-