courrier multi account restore compose

This commit is contained in:
alma 2025-04-28 19:42:42 +02:00
parent d3776c1026
commit 1dac8ec1aa

View File

@ -412,7 +412,9 @@ export async function getEmailContent(
const client = await getImapConnection(userId, accountId);
try {
await client.mailboxOpen(folder);
// Remove accountId prefix if present
const actualFolder = folder.includes(':') ? folder.split(':')[1] : folder;
await client.mailboxOpen(actualFolder);
const message = await client.fetchOne(emailId, {
source: true,
@ -477,7 +479,7 @@ export async function getEmailContent(
text: parsedEmail.text || '',
html: rawHtml
},
folder,
folder: actualFolder,
contentFetched: true,
size: size || 0
};