Files
dataroom/lib/emails/send-upgrade-plan.ts
zeekay 260fd6b8ce 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

34 lines
923 B
TypeScript

import { sendEmail } from "@/lib/resend";
import { CreateUserEmailProps } from "@/lib/types";
import UpgradePlanEmail from "@/components/emails/upgrade-plan";
const PLAN_TYPE_MAP = {
pro: "Pro",
business: "Business",
datarooms: "Data Rooms",
"datarooms-plus": "Data Rooms Plus",
"datarooms-premium": "Data Rooms Premium",
};
export const sendUpgradePlanEmail = async (
params: CreateUserEmailProps & { planType: string },
) => {
const { name, email } = params.user;
const { planType } = params;
const emailTemplate = UpgradePlanEmail({ name, planType });
const planTypeText = PLAN_TYPE_MAP[planType as keyof typeof PLAN_TYPE_MAP];
try {
await sendEmail({
to: email as string,
subject: `Thank you for upgrading to Hanzo Dataroom ${planTypeText}!`,
react: emailTemplate,
test: process.env.NODE_ENV === "development",
});
} catch (e) {
console.error(e);
}
};