IO-3187 Admin Enhancements

add BCC

Signed-off-by: Allan Carr <allan.carr@thinkimex.com>
This commit is contained in:
Allan Carr
2025-04-15 22:08:21 -07:00
parent f2a896d568
commit 159ee7364d
2 changed files with 5 additions and 3 deletions

View File

@@ -83,7 +83,7 @@ const sendServerEmail = async ({ subject, text }) => {
}
};
const sendWelcomeEmail = async ({ to, resetLink, dateLine, features }) => {
const sendWelcomeEmail = async ({ to, resetLink, dateLine, features, bcc }) => {
try {
await mailer.sendMail({
from: InstanceManager({
@@ -91,6 +91,7 @@ const sendWelcomeEmail = async ({ to, resetLink, dateLine, features }) => {
rome: `Rome Online <noreply@romeonline.io>`
}),
to,
bcc,
subject: InstanceManager({
imex: "Welcome to the ImEX Online platform.",
rome: "Welcome to the Rome Online platform."

View File

@@ -198,7 +198,7 @@ const unsubscribe = async (req, res) => {
};
const getWelcomeEmail = async (req, res) => {
const { authid, email } = req.body;
const { authid, email, bcc } = req.body;
try {
// Fetch user from Firebase
@@ -232,7 +232,8 @@ const getWelcomeEmail = async (req, res) => {
to: dbUser.email,
resetLink,
dateLine: moment().tz(dbUser.associations?.[0]?.bodyshop?.timezone).format("MM/DD/YYYY @ hh:mm a"),
features: dbUser.associations?.[0]?.bodyshop?.features
features: dbUser.associations?.[0]?.bodyshop?.features,
bcc
});
// Log success and return response