mirror of
https://github.com/hanzo-apps/dataroom.git
synced 2026-10-30 14:47:36 +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
39 lines
1.1 KiB
TypeScript
39 lines
1.1 KiB
TypeScript
import { sendEmail } from "@/lib/resend";
|
|
|
|
import DataRoomsInformationEmail from "@/components/emails/data-rooms-information";
|
|
|
|
import { CreateUserEmailProps } from "../types";
|
|
|
|
const USECASE_SUBJECTS = {
|
|
"mergers-and-acquisitions": "Virtual Data Rooms for Mergers and Acquisitions",
|
|
"startup-fundraising": "Virtual Data Rooms for Startup Fundraising",
|
|
"fund-management": "Virtual Data Rooms for Fund Management & Fundraising",
|
|
sales: "Virtual Data Rooms for Sales",
|
|
"project-management": "Virtual Data Rooms for Project Management",
|
|
operations: "Virtual Data Rooms for Operations",
|
|
other: "Virtual Data Rooms",
|
|
};
|
|
|
|
export const sendDataroomInfoEmail = async (
|
|
params: CreateUserEmailProps,
|
|
useCase: string,
|
|
) => {
|
|
const { email } = params.user;
|
|
|
|
const emailTemplate = DataRoomsInformationEmail();
|
|
|
|
const subject = USECASE_SUBJECTS[useCase as keyof typeof USECASE_SUBJECTS];
|
|
|
|
try {
|
|
await sendEmail({
|
|
to: email as string,
|
|
from: "Marc Seitz <[email protected]>",
|
|
subject,
|
|
react: emailTemplate,
|
|
test: process.env.NODE_ENV === "development",
|
|
});
|
|
} catch (e) {
|
|
console.error(e);
|
|
}
|
|
};
|