Use himalaya message send --save Sent (saves to Sent folder)
This commit is contained in:
parent
6e0e6d1da7
commit
00634d2e1d
2 changed files with 2 additions and 2 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue