Allow separate from and to emails
All checks were successful
Publish Docker Image / Publish Docker Image (push) Successful in 10s

This commit is contained in:
Ahmed Al-Taiar
2024-10-16 21:45:55 -04:00
parent 6540329f36
commit 7973663b2a
7 changed files with 21 additions and 3 deletions

View File

@@ -19,7 +19,7 @@ const transporter = nodemailer.createTransport({
export const sendEmail = async ({ to, subject, text, html }: Options) =>
await transporter.sendMail({
from: `${process.env.FIRST_NAME} ${process.env.LAST_NAME} <${process.env.GMAIL}>`,
from: `${process.env.FIRST_NAME} ${process.env.LAST_NAME} <${process.env.EMAIL_FROM}>`,
to: Array.isArray(to) ? to : [to],
subject,
text,