Files
anouma/lib/email/sendReminderEmail.ts
T
maro 7edeafe7c3
CI / test (push) Canceled after 0s
Release / promote-and-deploy (push) Canceled after 0s
CI / build-image (push) Canceled after 0s
Improve email branding and SMTP envelope
2026-09-18 12:51:40 +02:00

15 lines
599 B
TypeScript

import { getMailEnvelopeFrom, getMailFrom, getMailTransport } from "./transport";
import { renderReminderEmailHtml, renderReminderEmailText, type ReminderEmailData } from "./reminderTemplate";
export async function sendReminderEmail(to: string, data: ReminderEmailData) {
const transport = getMailTransport();
await transport.sendMail({
from: getMailFrom(),
envelope: { from: getMailEnvelopeFrom() },
to,
subject: `Dein Online-Termin bei ANOUMA beginnt in ${data.minutesBefore} Minuten`,
html: renderReminderEmailHtml(data),
text: renderReminderEmailText(data),
});
}