add email sender
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user