IO-3020 IO-3036 Initial removal of ProManager

This commit is contained in:
Patrick Fic
2024-11-21 13:37:36 -08:00
parent 289a666b6d
commit 9ccbca2678
124 changed files with 3199 additions and 1140 deletions

View File

@@ -53,8 +53,7 @@ const sendServerEmail = async ({ subject, text }) => {
{
from: InstanceManager({
imex: `ImEX Online API - ${process.env.NODE_ENV} <noreply@imex.online>`,
rome: `Rome Online API - ${process.env.NODE_ENV} <noreply@romeonline.io>`,
promanager: `ProManager API - ${process.env.NODE_ENV} <noreply@promanager.web-est.com>`
rome: `Rome Online API - ${process.env.NODE_ENV} <noreply@romeonline.io>`
}),
to: ["patrick@imexsystems.ca", "support@thinkimex.com"],
subject: subject,
@@ -78,27 +77,13 @@ const sendServerEmail = async ({ subject, text }) => {
}
};
const sendProManagerWelcomeEmail = async ({ to, subject, html }) => {
try {
await mailer.sendMail({
from: `ProManager <noreply@promanager.web-est.com>`,
to,
subject,
html
});
} catch (error) {
logger.log("server-email-failure", "error", null, null, { error });
}
};
const sendTaskEmail = async ({ to, subject, type = "text", html, text, attachments }) => {
try {
mailer.sendMail(
{
from: InstanceManager({
imex: `ImEX Online <noreply@imex.online>`,
rome: `Rome Online <noreply@romeonline.io>`,
promanager: `ProManager <noreply@promanager.web-est.com>`
rome: `Rome Online <noreply@romeonline.io>`
}),
to: to,
subject: subject,
@@ -247,8 +232,7 @@ const emailBounce = async (req, res) => {
replyTo ===
InstanceManager({
imex: "noreply@imex.online",
rome: "noreply@romeonline.io",
promanager: "noreply@promanager.web-est.com"
rome: "noreply@romeonline.io"
})
) {
res.sendStatus(200);
@@ -270,13 +254,11 @@ const emailBounce = async (req, res) => {
//bcc: "patrick@snapt.ca",
subject: `${InstanceMgr({
imex: "ImEX Online",
rome: "Rome Online",
promanager: "ProManager"
rome: "Rome Online"
})} Bounced Email - RE: ${subject}`,
text: `${InstanceMgr({
imex: "ImEX Online",
rome: "Rome Online",
promanager: "ProManager"
rome: "Rome Online"
})} has tried to deliver an email with the subject: ${subject} to the intended recipients but encountered an error.
${body.bounce?.bouncedRecipients.map(
@@ -305,6 +287,5 @@ module.exports = {
sendEmail,
sendServerEmail,
sendTaskEmail,
sendProManagerWelcomeEmail,
emailBounce
};