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
This commit is contained in:
Chandler Copeland
2026-04-03 15:43:17 -06:00
parent 70c48cc377
commit e1cdfe9b7b

View File

@@ -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<void> {
const transporter = createTransporter();
await transporter.sendMail({
from: '"Teressa Copeland Homes" <teressa@tcopelandhomes.com>',
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'),
});
}