diff --git a/app/api/waitlist/route.ts b/app/api/waitlist/route.ts
index 9664051..4879048 100644
--- a/app/api/waitlist/route.ts
+++ b/app/api/waitlist/route.ts
@@ -45,7 +45,7 @@ export async function POST(req: NextRequest) {
// Double opt-in: e-mail a confirmation link via Resend. If Resend isn't
// configured (local dev / self-host), auto-confirm so the flow still works.
if (result.token && isEmailConfigured()) {
- const sent = await sendWaitlistVerification({ email, token: result.token, brand });
+ const sent = await sendWaitlistVerification({ email, token: result.token, brand, site: domain });
if (!sent.ok) {
// Never block a signup because email is misconfigured (bad key, unverified
// domain, Resend down). Save them and auto-confirm; log loudly so the
diff --git a/bun.lock b/bun.lock
index f2136a8..d834e29 100644
--- a/bun.lock
+++ b/bun.lock
@@ -7,6 +7,7 @@
"dependencies": {
"@profullstack/affiliates": "0.3.0",
"@profullstack/coinpay-onboard": "^0.5.0",
+ "@profullstack/cross-promo": "^0.1.0",
"@profullstack/footer": "latest",
"@profullstack/libsql-pg": "^0.1.4",
"@profullstack/player": "0.17.0",
@@ -143,6 +144,8 @@
"@profullstack/coinpay-onboard": ["@profullstack/coinpay-onboard@0.5.0", "", { "dependencies": { "@modelcontextprotocol/sdk": "^1.32.2", "zod": "^4.6.7" }, "bin": { "coinpay-onboard": "bin/coinpay-onboard" } }, "sha512-yqSx3pgJLP521Km+XNNn9fyjbbHppgozuGTtzTln9yy+2I0h0bjqXSpsFPwoSgVb5QcyBx+Wzv5170Qb7va1iQ=="],
+ "@profullstack/cross-promo": ["@profullstack/cross-promo@0.1.0", "", { "bin": { "cross-promo": "bin/cross-promo.js" } }, "sha512-LQMxZSvApH1T+8WmMu/Nj1LqojXeTw6wAtpLfhuKFwx9eR36hQG/7vVIDkKpmU5zKw7UwARe20MOfFCak2+ejA=="],
+
"@profullstack/emailer": ["@profullstack/emailer@1.0.3", "", {}, "sha512-VyAtCcfnSI6LOwJvWogCr3ZNmEsaZw+iuWrqnosLsdcKsbRyCrCmXigMNZJZEjlgYlR+lK//PwNPG+xtCFvWAw=="],
"@profullstack/footer": ["@profullstack/footer@0.4.0", "", { "peerDependencies": { "react": ">=18" }, "optionalPeers": ["react"], "bin": { "profullstack-footer": "bin/profullstack-footer.js" } }, "sha512-EJZnMUQmWDi9Gzx6BAjogloeaPFFSSCHtHJuC9dsXiOz8M87hfn6Z+Zx9AMYWk8s6xemPrPlkXKGB3PZugkcEA=="],
diff --git a/lib/email.ts b/lib/email.ts
index 962aaf0..409edf8 100644
--- a/lib/email.ts
+++ b/lib/email.ts
@@ -4,6 +4,8 @@
// RESEND_API_KEY is unset — e.g. local dev — isEmailConfigured() is false and
// callers fall back to auto-confirming so the flow still works offline.
+import { promoBlock } from "@profullstack/cross-promo";
+
const RESEND_ENDPOINT = "https://api.resend.com/emails";
/**
@@ -87,18 +89,31 @@ async function send(opts: {
}
/** Sends the "confirm your spot" email with a one-click verification link. */
-export function sendWaitlistVerification(opts: {
+export async function sendWaitlistVerification(opts: {
email: string;
token: string;
brand?: string;
+ /** The tenant domain the signup came from (?dn=); defaults to moshcoding.com. */
+ site?: string;
}): Promise
| ${promo.html} |