Files
sign/packages/lib/mail/signingRequestTemplate.ts

32 lines
1.3 KiB
TypeScript
Raw Normal View History

2023-02-21 17:42:30 +01:00
import { NEXT_PUBLIC_WEBAPP_URL } from "../constants";
import { baseEmailTemplate } from "./baseTemplate";
2023-04-04 22:02:32 +00:00
import { Document as PrismaDocument } from "@prisma/client";
2023-02-21 17:42:30 +01:00
export const signingRequestTemplate = (
message: string,
document: any,
recipient: any,
ctaLink: string,
ctaLabel: string,
user: any
) => {
const customContent = `
<p style="margin: 30px 0px; text-align: center">
<a href="${ctaLink}" style="background-color: #37f095; white-space: nowrap; color: white; border-color: transparent; border-width: 1px; border-radius: 0.375rem; font-size: 18px; padding-left: 16px; padding-right: 16px; padding-top: 10px; padding-bottom: 10px; text-decoration: none; margin-top: 4px; margin-bottom: 4px;">
2023-02-21 17:42:30 +01:00
${ctaLabel}
</a>
</p>
<hr size="1" style="height:1px;border:none;color:#e0e0e0;background-color:#e0e0e0">
Click the button to view "${document.title}".<br>
<small>If you have questions about this document, you should ask ${user.name}.</small>
2023-02-23 20:12:30 +01:00
<hr size="1" style="height:1px;border:none;color:#e0e0e0;background-color:#e0e0e0">
<p style="margin-top: 14px;">
2023-05-28 06:16:48 +02:00
<small>Want to send you own signing links? <a href="https://documenso.com">Hosted Documenso is here!</a>.</small>
2023-02-23 20:12:30 +01:00
</p>`;
2023-02-21 17:42:30 +01:00
const html = baseEmailTemplate(message, customContent);
return html;
};
2023-05-28 06:16:48 +02:00
export default signingRequestTemplate;