From 708ce642e2929e80e3b12f7eb1af3c27ae693175 Mon Sep 17 00:00:00 2001 From: alma Date: Wed, 16 Apr 2025 20:10:50 +0200 Subject: [PATCH] Neah version mail forward fix 4 --- app/mail/page.tsx | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/app/mail/page.tsx b/app/mail/page.tsx index 58945e1..9b6d1b8 100644 --- a/app/mail/page.tsx +++ b/app/mail/page.tsx @@ -1376,7 +1376,7 @@ export default function MailPage() { .split('\n') .map(line => line.trim()) .filter(line => { - // Remove email headers and common footer markers + // Remove email client signatures and headers return !line.match(/^(From|To|Sent|Subject|Date|Cc|Bcc):/i) && !line.match(/^-{2,}/) && !line.match(/^_{2,}/) && @@ -1386,7 +1386,11 @@ export default function MailPage() { !line.match(/^[*_-]{3,}/) && !line.match(/^Envoyé depuis/i) && !line.match(/^Envoyé à partir de/i) && - !line.match(/^Sent from/i); + !line.match(/^Sent from/i) && + !line.match(/^Outlook pour/i) && + !line.match(/^De :/i) && + !line.match(/^À :/i) && + !line.match(/^Objet :/i); }) .join('\n') .trim(); @@ -1414,11 +1418,11 @@ export default function MailPage() { } replyHeader += `\n`; } else { - // Same header format for both reply and reply all + // Simple header for reply and reply all replyHeader = `\n\nOn ${formattedDate}, ${selectedEmail.from} wrote:\n`; } - // Indent the original content with proper spacing + // Indent the original content const indentedContent = originalContent .split('\n') .map(line => line ? `> ${line}` : '>') // Keep empty lines as '>' for better readability