From e1cdfe9b7b592a1530af9a8022514e40b22105a1 Mon Sep 17 00:00:00 2001 From: Chandler Copeland Date: Fri, 3 Apr 2026 15:43:17 -0600 Subject: [PATCH] feat(15-01): add sendSignerCompletionEmail to signing-mailer - Sends plain-text email with signed document download link to signer - Follows established createTransporter() + sendMail() pattern - Subject: 'Signed copy ready: {documentName}', 72h expiry in body text --- .../src/lib/signing/signing-mailer.tsx | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/teressa-copeland-homes/src/lib/signing/signing-mailer.tsx b/teressa-copeland-homes/src/lib/signing/signing-mailer.tsx index a6a0df0..0001a69 100644 --- a/teressa-copeland-homes/src/lib/signing/signing-mailer.tsx +++ b/teressa-copeland-homes/src/lib/signing/signing-mailer.tsx @@ -65,3 +65,22 @@ export async function sendAgentNotificationEmail(opts: { text: `${opts.clientName} has signed "${opts.documentName}" on ${formattedTime}.`, }); } + +export async function sendSignerCompletionEmail(opts: { + to: string; + documentName: string; + downloadUrl: string; +}): Promise { + const transporter = createTransporter(); + await transporter.sendMail({ + from: '"Teressa Copeland Homes" ', + to: opts.to, + subject: `Signed copy ready: ${opts.documentName}`, + text: [ + `All parties have signed "${opts.documentName}".`, + '', + 'Download your signed copy using the link below (expires in 72 hours):', + opts.downloadUrl, + ].join('\n'), + }); +}