mirror of
https://github.com/hanzoai/dataroom.git
synced 2026-10-30 18:41:07 +00:00
- Replace all Papermark branding with Hanzo Dataroom - Update metadata, titles, descriptions, OG tags - Update email templates footer and branding - Replace papermark.io/com URLs with dataroom.hanzo.ai - Update powered-by component - Update x-powered-by header - Update legal references to Hanzo AI, Inc. - Update social handles to @hanzoai - Update README, CLA, LICENSE, SECURITY docs
31 lines
766 B
TypeScript
31 lines
766 B
TypeScript
import { sendEmail } from "@/lib/resend";
|
|
|
|
import DataroomTrialWelcome from "@/components/emails/dataroom-trial-welcome";
|
|
|
|
export const sendDataroomTrialWelcome = async ({
|
|
fullName,
|
|
to,
|
|
}: {
|
|
fullName: string;
|
|
to: string;
|
|
}) => {
|
|
// Schedule the email to be sent 6 minutes from now
|
|
const sixMinuteFromNow = new Date(Date.now() + 1000 * 60 * 6).toISOString();
|
|
|
|
// get the first name from the full name
|
|
const name = fullName.split(" ")[0];
|
|
|
|
try {
|
|
await sendEmail({
|
|
to: to,
|
|
from: "Marc Seitz <[email protected]>",
|
|
subject: `For ${name}`,
|
|
react: DataroomTrialWelcome({ name }),
|
|
test: process.env.NODE_ENV === "development",
|
|
scheduledAt: sixMinuteFromNow,
|
|
});
|
|
} catch (e) {
|
|
console.error(e);
|
|
}
|
|
};
|