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 {
|
try {
|
||||||
await mailer.sendMail({
|
await mailer.sendMail({
|
||||||
from: InstanceManager({
|
from: InstanceManager({
|
||||||
@@ -91,6 +91,7 @@ const sendWelcomeEmail = async ({ to, resetLink, dateLine, features }) => {
|
|||||||
rome: `Rome Online <noreply@romeonline.io>`
|
rome: `Rome Online <noreply@romeonline.io>`
|
||||||
}),
|
}),
|
||||||
to,
|
to,
|
||||||
|
bcc,
|
||||||
subject: InstanceManager({
|
subject: InstanceManager({
|
||||||
imex: "Welcome to the ImEX Online platform.",
|
imex: "Welcome to the ImEX Online platform.",
|
||||||
rome: "Welcome to the Rome Online platform."
|
rome: "Welcome to the Rome Online platform."
|
||||||
|
|||||||
@@ -198,7 +198,7 @@ const unsubscribe = async (req, res) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const getWelcomeEmail = async (req, res) => {
|
const getWelcomeEmail = async (req, res) => {
|
||||||
const { authid, email } = req.body;
|
const { authid, email, bcc } = req.body;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// Fetch user from Firebase
|
// Fetch user from Firebase
|
||||||
@@ -232,7 +232,8 @@ const getWelcomeEmail = async (req, res) => {
|
|||||||
to: dbUser.email,
|
to: dbUser.email,
|
||||||
resetLink,
|
resetLink,
|
||||||
dateLine: moment().tz(dbUser.associations?.[0]?.bodyshop?.timezone).format("MM/DD/YYYY @ hh:mm a"),
|
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
|
// Log success and return response
|
||||||
|
|||||||
Reference in New Issue
Block a user