diff --git a/app/courrier/page.tsx b/app/courrier/page.tsx index 0e271edd..96a52709 100644 --- a/app/courrier/page.tsx +++ b/app/courrier/page.tsx @@ -362,11 +362,19 @@ function getReplyBody(email: Email, type: 'reply' | 'reply-all' | 'forward'): st : body; } - // Convert plain text to HTML if needed + // Convert plain text to HTML if needed, preserving line breaks if (!contentType.includes('text/html')) { content = content .split('\n') - .map(line => `
${line}
`) + .map(line => { + // Preserve empty lines + if (!line.trim()) return '${line}
`; + } + return `${line}
`; + }) .join(''); } @@ -404,7 +412,7 @@ function getReplyBody(email: Email, type: 'reply' | 'reply-all' | 'forward'): stDate: ${date}
Subject: ${email.subject}
To: ${Array.isArray(email.to) ? email.to.join(', ') : email.to}
-On ${date}, ${email.from} wrote:
-${content}+${content}