diff --git a/app/api/appointments/[id]/route.ts b/app/api/appointments/[id]/route.ts index be50b96..229d164 100644 --- a/app/api/appointments/[id]/route.ts +++ b/app/api/appointments/[id]/route.ts @@ -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); } diff --git a/app/api/appointments/route.ts b/app/api/appointments/route.ts index c50e7bb..7ddc98b 100644 --- a/app/api/appointments/route.ts +++ b/app/api/appointments/route.ts @@ -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) {