send fix, send error handling

This commit is contained in:
Timur Ercan
2023-02-09 19:17:34 +01:00
parent 08ec274a22
commit 36df6be703
4 changed files with 28 additions and 13 deletions

View File

@@ -2,7 +2,11 @@ import { sendMail } from "./sendMail";
import { NEXT_PUBLIC_WEBAPP_URL } from "@documenso/lib/constants";
import { transactionEmailTemplate } from "@documenso/lib/mail";
export const sendSignedMail = async (recipient: any, document: any) => {
export const sendSignedMail = async (
recipient: any,
document: any,
user: any
) => {
// todo check if recipient has an account
await sendMail(
document.User.email,
@@ -14,7 +18,8 @@ export const sendSignedMail = async (recipient: any, document: any) => {
document,
recipient,
`${NEXT_PUBLIC_WEBAPP_URL}/documents/${document.id}`,
`View Document`
`View Document`,
user
)
);
};