mirror of
https://github.com/documenso/documenso.git
synced 2025-11-13 16:23:06 +10:00
nodemailer and sendgrid integration
This commit is contained in:
12
packages/lib/mail/sendSignedMail.ts
Normal file
12
packages/lib/mail/sendSignedMail.ts
Normal file
@ -0,0 +1,12 @@
|
||||
import { sendMail } from "./sendMail";
|
||||
import { NEXT_PUBLIC_WEBAPP_URL } from "@documenso/lib/constants";
|
||||
|
||||
export const sendSignedMail = async (document: any, recipient: any) => {
|
||||
// todo check if recipient has an account
|
||||
|
||||
sendMail(
|
||||
document.user.email,
|
||||
`${recipient.email} signed ${document.title}`,
|
||||
`Hi ${document.user.name}, ${recipient.email} has signed your document ${document.title}. Click <a href="${NEXT_PUBLIC_WEBAPP_URL}/document/${document.id}"> VIEW DOCUMENT</a> to view it now.`
|
||||
);
|
||||
};
|
||||
Reference in New Issue
Block a user