💬 ♻️ signed mail template
This commit is contained in:
@@ -1,23 +1,22 @@
|
||||
import { sendMail } from "./sendMail";
|
||||
import { NEXT_PUBLIC_WEBAPP_URL } from "@documenso/lib/constants";
|
||||
import { transactionEmailTemplate } from "@documenso/lib/mail";
|
||||
import { signingCompleteTemplate } from "@documenso/lib/mail";
|
||||
|
||||
export const sendSigningDoneMail = async (
|
||||
recipient: any,
|
||||
document: any,
|
||||
user: any
|
||||
) => {
|
||||
// todo check if recipient has an account
|
||||
await sendMail(
|
||||
user.email,
|
||||
`Completed: "${document.title}"`,
|
||||
transactionEmailTemplate(
|
||||
`All recipients have signed "${document.title}"`,
|
||||
document,
|
||||
recipient,
|
||||
`${NEXT_PUBLIC_WEBAPP_URL}/api/documents/${document.id}`,
|
||||
`Download "${document.title}"`,
|
||||
user
|
||||
)
|
||||
// base template with footer and box vs content template for eact type
|
||||
signingCompleteTemplate(`All recipients have signed "${document.title}".`),
|
||||
[
|
||||
{
|
||||
filename: document.title,
|
||||
content: Buffer.from(document.document.toString(), "base64"),
|
||||
},
|
||||
]
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user