mirror of
https://github.com/documenso/documenso.git
synced 2025-11-09 20:12:31 +10:00
15 lines
468 B
TypeScript
15 lines
468 B
TypeScript
import { resetPasswordTemplate } from "@documenso/lib/mail";
|
|
import { NEXT_PUBLIC_WEBAPP_URL } from "../constants";
|
|
import { sendMail } from "./sendMail";
|
|
import { User } from "@prisma/client";
|
|
|
|
export const sendResetPassword = async (user: User, token: string) => {
|
|
await sendMail(
|
|
user.email,
|
|
"Forgot password?",
|
|
resetPasswordTemplate(`${NEXT_PUBLIC_WEBAPP_URL}/auth/reset/${token}`, "Reset Your Password")
|
|
).catch((err) => {
|
|
throw err;
|
|
});
|
|
};
|