Papermark is the open-source DocSend alternative and secure data rooms with built-in analytics and custom domains.
feat: update email
Marc Seitz039442f9d61a
diff --git a/components/emails/email-verification.tsx b/components/emails/email-verification.tsxindex 5bbec401..1fdf4527 100644--- a/components/emails/email-verification.tsx+++ b/components/emails/email-verification.tsx@@ -15,13 +15,15 @@ import {export default function EmailVerification({verificationURL = "papermark.io",+ email = "[email protected]",}: {verificationURL: string;+ email: string;}) {return (<Html><Head />- <Preview>Email Verification</Preview>+ <Preview>Verify your email to view the document</Preview><Tailwind><Body className="bg-white my-auto mx-auto font-sans"><Container className="my-10 mx-auto p-5 w-[465px]">@@ -29,21 +31,26 @@ export default function EmailVerification({<span className="font-bold tracking-tighter">Papermark</span></Heading><Heading className="mx-0 my-7 p-0 text-center text-xl font-semibold text-black">- Email Verification+ Please verify your email</Heading><Text className="text-sm leading-6 text-black">- Welcome to papermark. Please click the button below to verify your- email.+ Please click the verification link below to view the document.</Text><Section className="my-8 text-center"><Button- style={{ padding: "12px 20px" }}className="bg-black rounded text-white text-xs font-semibold no-underline text-center"href={verificationURL}+ style={{ padding: "12px 20px" }}>Verify Email</Button></Section>+ <Text className="text-sm leading-6 text-black">+ or copy and paste this URL into your browser:+ </Text>+ <Text className="max-w-sm flex-wrap break-words font-medium text-purple-600 no-underline">+ {verificationURL.replace(/^https?:\/\//, "")}+ </Text><Hr /><Section className="mt-8 text-gray-400"><Text className="text-xs">@@ -57,8 +64,10 @@ export default function EmailVerification({</a></Text><Text className="text-xs">- If you have any feedback or questions about this email, simply- reply to it. I'd love to hear from you!+ This email was intended for{" "}+ <span className="text-black">{email}</span>. If you were not+ expecting this email, you can ignore this email. If you have any+ feedback or questions about this email, simply reply to it.</Text></Section></Container>diff --git a/lib/emails/send-email-verification.ts b/lib/emails/send-email-verification.tsindex 91bbe269..06e23c60 100644--- a/lib/emails/send-email-verification.ts+++ b/lib/emails/send-email-verification.ts@@ -1,12 +1,16 @@import { sendEmail } from "@/lib/resend";import EmailVerification from "@/components/emails/email-verification";-export const sendVerificationEmail = async (email: string, verificationURL: string) => {- const emailTemplate = EmailVerification({ verificationURL });- await sendEmail({+export const sendVerificationEmail = async (+ email: string,+ verificationURL: string,+) => {+ const emailTemplate = EmailVerification({ verificationURL, email });+ await sendEmail({to: email,- subject: `Please verify your email for to view document [Papermark.io]`,+ subject: "Verify your email address",react: emailTemplate,test: process.env.NODE_ENV === "development",+ system: true,});-};\ No newline at end of file+};