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:
@@ -65,3 +65,22 @@ export async function sendAgentNotificationEmail(opts: {
|
|||||||
text: `${opts.clientName} has signed "${opts.documentName}" on ${formattedTime}.`,
|
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'),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user