Add the Workshops page and keep each sign-up on the site.

The form is built once to the settled field set, and a valid send is saved before anyone is emailed.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
adilalloandCursor committed 2026-11-03 19:56:49 -07:00
1 parent 974a5ace4c
commit c0ba3a3798
50 files changed
+2773 -1

No files matched your search

+34
View File
@@ -1,5 +1,10 @@
import nodemailer from "nodemailer";
import { logger } from "../logger";
import {
buildWorkshopConfirmationMail,
buildWorkshopInboxMail,
type WorkshopInquiryMailInput,
} from "../workshopSignupMail";
import { getSmtpUrl } from "./env";
function escapeHtml(value: string): string {
@@ -134,6 +139,35 @@ export async function sendOrganizerInquiryNotification(params: {
});
}
export async function sendWorkshopInquiryNotification(
input: WorkshopInquiryMailInput & { to: string },
): Promise<void> {
const { subject, text, html } = buildWorkshopInboxMail(input);
await sendHtmlMail({
to: input.to,
replyTo: input.values.email,
subject,
text,
html,
devLog: `[dev] Workshop inquiry ${input.requestId} from ${input.values.email} to ${input.to}:\n${text}`,
});
}
export async function sendWorkshopInquiryConfirmation(input: {
to: string;
largeOrganization: boolean;
schedulingUrl: string;
}): Promise<void> {
const { subject, text, html } = buildWorkshopConfirmationMail(input);
await sendHtmlMail({
to: input.to,
subject,
text,
html,
devLog: `[dev] Workshop confirmation for ${input.to} (large=${input.largeOrganization})`,
});
}
export async function sendEmailChangeEmail(
to: string,
verifyUrl: string,