add email sender

This commit is contained in:
Helena
2025-08-28 18:03:28 +03:00
parent 7d1400fba6
commit 5cf29447b3

View File

@@ -52,7 +52,13 @@ export const sendEmail = enhanceAction(
const mailer = await getMailer();
const log = await getLogger();
if (!process.env.EMAIL_USER) {
log.error('Sending email failed, as no sender found in env.')
throw new Error('No email user configured');
}
const result = await mailer.sendEmail({
from: process.env.EMAIL_USER,
to,
subject,
html,