Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

change from

Steven Tey80547d9d13fd
diff --git a/apps/web/app/api/callback/stripe/route.ts b/apps/web/app/api/callback/stripe/route.ts
index b28d1ea9c5..8b48ada34f 100644
--- a/apps/web/app/api/callback/stripe/route.ts
+++ b/apps/web/app/api/callback/stripe/route.ts
@@ -259,6 +259,7 @@ export const POST = async (req: Request) => {
projectUsers.map((email) =>
sendEmail({
email,
subject: "Feedback on your Dub.co experience?",
text: "Hey!\n\nI noticed you recently cancelled your Dub.co subscription – we're sorry to see you go!\n\nI'd love to hear your feedback on your experience with Dub – what could we have done better?\n\nThanks!\n\nSteven Tey\nFounder, Dub.co",
}),
diff --git a/apps/web/emails/index.ts b/apps/web/emails/index.ts
index 9158e33e6d..9b72714e71 100644
--- a/apps/web/emails/index.ts
+++ b/apps/web/emails/index.ts
@@ -7,12 +7,14 @@ export const client = new Client(process.env.POSTMARK_API_KEY as string);
export const sendEmail = async ({
email,
subject,
+ from,
text,
react,
marketing,
}: {
email: string;
subject: string;
+ from?: string;
text?: string;
react?: ReactElement<any, string | JSXElementConstructor<any>>;
marketing?: boolean;
@@ -25,11 +27,12 @@ export const sendEmail = async ({
}
return client.sendEmail({
- From: marketing
- : process.env.NEXT_PUBLIC_IS_DUB
- : `${process.env.NEXT_PUBLIC_APP_NAME} <system@${process.env.NEXT_PUBLIC_APP_DOMAIN}>`,
+ From:
+ from || marketing
+ : process.env.NEXT_PUBLIC_IS_DUB
+ : `${process.env.NEXT_PUBLIC_APP_NAME} <system@${process.env.NEXT_PUBLIC_APP_DOMAIN}>`,
To: email,
Subject: subject,
...(text && { TextBody: text }),