From f396798966fcf8d43f45583ccd60a12cad407a4b Mon Sep 17 00:00:00 2001 From: Maxim Baz Date: Tue, 3 Dec 2024 13:21:59 +0100 Subject: [PATCH] mailersend: merge receipt templates into one --- src/donation/email.ts | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/donation/email.ts b/src/donation/email.ts index 5e26dc4..235459a 100644 --- a/src/donation/email.ts +++ b/src/donation/email.ts @@ -50,9 +50,10 @@ export async function sendMembershipEmail(donation: DonationToEmail) { { email: donation.email, data: { - donation_id: donation.id, subject_prefix: process.env.VERCEL_ENV === "production" ? "" : "DEV: ", + donation_id: donation.id, + recipient: donation.recipient, }, }, ]); @@ -80,14 +81,15 @@ export async function sendPaymentEmail( { email: donation.email, data: { - amount: donation.amount.toLocaleString("da-DK"), + subject_prefix: + process.env.VERCEL_ENV === "production" ? "" : "DEV: ", donation_id: donation.id, + recipient: donation.recipient, + + amount: donation.amount.toLocaleString("da-DK"), frequency: donation.frequency, tax_deductible: donation.tax_deductible, - recipient: donation.recipient, bank_msg: bank?.msg ?? null, - subject_prefix: - process.env.VERCEL_ENV === "production" ? "" : "DEV: ", }, }, ]);