IO-3187 Admin Enhancements
add BCC Signed-off-by: Allan Carr <allan.carr@thinkimex.com>
This commit is contained in:
@@ -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."
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user