Use himalaya message send --save Sent (saves to Sent folder)

This commit is contained in:
Dave 2026-08-17 20:39:22 +02:00
parent 6e0e6d1da7
commit 00634d2e1d
2 changed files with 2 additions and 2 deletions

View file

@ -222,7 +222,7 @@ ${pdfB64}\r
const emlContent = readFileSync(emlPath, "utf8");
const toMatch = emlContent.match(/^To:\s*(.+)$/m);
const toAddresses = toMatch ? toMatch[1].trim() : "";
execSync(`himalaya -a dyfins smtp send --mail-from SJ@Dyfins.com --rcpt-to "${toAddresses}" < "${emlPath}"`, { timeout: 60 });
execSync(`himalaya -a dyfins message send --save Sent < "${emlPath}"`, { timeout: 90 });
} finally {
unlinkSync(emlPath);
}

View file

@ -226,7 +226,7 @@ ${body}\r
const emlContent = readFileSync(emlPath, "utf8");
const toMatch = emlContent.match(/^To:\s*(.+)$/m);
const toAddresses = toMatch ? toMatch[1].trim() : "";
execSync(`himalaya -a dyfins smtp send --mail-from SJ@Dyfins.com --rcpt-to "${toAddresses}" < "${emlPath}"`, { timeout: 60 });
execSync(`himalaya -a dyfins message send --save Sent < "${emlPath}"`, { timeout: 90 });
} finally {
unlinkSync(emlPath);
if (pdfPath && pdfPath.length > 0) {