Files
dataroom/lib/emails/send-upgrade-six-months-checkin.ts
zeekay 130e86ef81 Rebrand from Papermark to Hanzo Dataroom
- 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
2026-03-01 19:02:19 -08:00

35 lines
1.0 KiB
TypeScript

import { sendEmail } from "@/lib/resend";
import SixMonthMilestoneEmail from "@/components/emails/upgrade-six-month-checkin";
import { CreateUserEmailProps } from "../types";
export const sendSixMonthMilestoneEmail = async (
params: CreateUserEmailProps & { planName?: string },
) => {
const { name, email } = params.user;
const { planName = "Pro" } = params;
// Schedule the email to be sent 6.5 months from now (195 days)
const sixAndHalfMonthsFromNow = new Date(
Date.now() + 1000 * 60 * 60 * 24 * 195,
).toISOString();
// Get the first name from the full name
const firstName = name ? name.split(" ")[0] : null;
const emailTemplate = SixMonthMilestoneEmail({ name: firstName, planName });
try {
await sendEmail({
to: email as string,
subject: "6 months with Hanzo Dataroom",
from: "Marc Seitz <[email protected]>",
react: emailTemplate,
test: process.env.NODE_ENV === "development",
scheduledAt: sixAndHalfMonthsFromNow,
});
} catch (e) {
console.error(e);
}
};