IO-3386 Cleanup To extension
Signed-off-by: Allan Carr <allan@imexsystems.ca>
This commit is contained in:
@@ -47,11 +47,6 @@ const logEmail = async (req, email) => {
|
|||||||
const sendServerEmail = async ({ subject, text, to = [] }) => {
|
const sendServerEmail = async ({ subject, text, to = [] }) => {
|
||||||
if (process.env.NODE_ENV === undefined) return;
|
if (process.env.NODE_ENV === undefined) return;
|
||||||
|
|
||||||
let sentTo = ["support@imexsystems.ca"];
|
|
||||||
if (to?.length) {
|
|
||||||
sentTo = [...sentTo, ...to];
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
mailer.sendMail(
|
mailer.sendMail(
|
||||||
{
|
{
|
||||||
@@ -59,7 +54,7 @@ const sendServerEmail = async ({ subject, text, to = [] }) => {
|
|||||||
imex: `ImEX Online API - ${process.env.NODE_ENV} <noreply@imex.online>`,
|
imex: `ImEX Online API - ${process.env.NODE_ENV} <noreply@imex.online>`,
|
||||||
rome: `Rome Online API - ${process.env.NODE_ENV} <noreply@romeonline.io>`
|
rome: `Rome Online API - ${process.env.NODE_ENV} <noreply@romeonline.io>`
|
||||||
}),
|
}),
|
||||||
to: sentTo,
|
to: ["support@imexsystems.ca", ...to],
|
||||||
subject: subject,
|
subject: subject,
|
||||||
text: text,
|
text: text,
|
||||||
ses: {
|
ses: {
|
||||||
|
|||||||
Reference in New Issue
Block a user