Environment setup and email white labeling.
This commit is contained in:
@@ -15,7 +15,7 @@ const queries = require("../graphql-client/queries");
|
||||
const ses = new aws.SES({
|
||||
apiVersion: "latest",
|
||||
|
||||
region: "ca-central-1",
|
||||
region: "us-east-2",
|
||||
});
|
||||
|
||||
let transporter = nodemailer.createTransport({
|
||||
@@ -27,7 +27,7 @@ exports.sendServerEmail = async function ({ subject, text }) {
|
||||
try {
|
||||
transporter.sendMail(
|
||||
{
|
||||
from: `ImEX Online API - ${process.env.NODE_ENV} <noreply@imex.online>`,
|
||||
from: `Rome Online API - ${process.env.NODE_ENV} <noreply@romeonline.io>`,
|
||||
to: ["patrick@imexsystems.ca"],
|
||||
subject: subject,
|
||||
text: text,
|
||||
@@ -55,7 +55,7 @@ exports.sendTaskEmail = async function ({ to, subject, text, attachments }) {
|
||||
try {
|
||||
transporter.sendMail(
|
||||
{
|
||||
from: `ImEX Online <noreply@imex.online>`,
|
||||
from: `Rome Online <noreply@romeonline.io>`,
|
||||
to: to,
|
||||
subject: subject,
|
||||
text: text,
|
||||
@@ -227,7 +227,7 @@ exports.emailBounce = async function (req, res, next) {
|
||||
}
|
||||
});
|
||||
messageId = message.mail.messageId;
|
||||
if (replyTo === "noreply@imex.online") {
|
||||
if (replyTo === "noreply@romeonline.io") {
|
||||
res.sendStatus(200);
|
||||
return;
|
||||
}
|
||||
@@ -239,10 +239,10 @@ exports.emailBounce = async function (req, res, next) {
|
||||
});
|
||||
transporter.sendMail(
|
||||
{
|
||||
from: `ImEX Online <noreply@imex.online>`,
|
||||
from: `Rome Online <noreply@romeonline.io>`,
|
||||
to: replyTo,
|
||||
subject: `ImEX Online Bounced Email - RE: ${subject}`,
|
||||
text: `ImEX Online has tried to deliver an email with the subject: ${subject} to the intended recipients but encountered an error.
|
||||
subject: `Rome Online Bounced Email - RE: ${subject}`,
|
||||
text: `Rome Online has tried to deliver an email with the subject: ${subject} to the intended recipients but encountered an error.
|
||||
|
||||
${body.bounce?.bouncedRecipients.map(
|
||||
(r) =>
|
||||
|
||||
Reference in New Issue
Block a user