add email sender
This commit is contained in:
@@ -52,7 +52,13 @@ export const sendEmail = enhanceAction(
|
|||||||
const mailer = await getMailer();
|
const mailer = await getMailer();
|
||||||
const log = await getLogger();
|
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({
|
const result = await mailer.sendEmail({
|
||||||
|
from: process.env.EMAIL_USER,
|
||||||
to,
|
to,
|
||||||
subject,
|
subject,
|
||||||
html,
|
html,
|
||||||
|
|||||||
Reference in New Issue
Block a user