From d88c925a682614008dcc56270184a141767feb17 Mon Sep 17 00:00:00 2001 From: Patrick Fic Date: Fri, 24 Feb 2023 16:04:04 -0800 Subject: [PATCH] Environment setup and email white labeling. --- client/.env.production | 8 ++++---- client/src/landing/data.source.js | 2 +- client/src/redux/email/email.reducer.js | 2 +- client/src/utils/TemplateConstants.js | 2 +- server/email/sendemail.js | 14 +++++++------- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/client/.env.production b/client/.env.production index 81d504796..bfb387f8c 100644 --- a/client/.env.production +++ b/client/.env.production @@ -1,5 +1,5 @@ -REACT_APP_GRAPHQL_ENDPOINT=https://db.test.bodyshop.app/v1/graphql -REACT_APP_GRAPHQL_ENDPOINT_WS=wss://db.test.bodyshop.app/v1/graphql +REACT_APP_GRAPHQL_ENDPOINT=https://db.romeonline.io/v1/graphql +REACT_APP_GRAPHQL_ENDPOINT_WS=wss://db.romeonline.io/v1/graphql REACT_APP_GA_CODE=231103507 REACT_APP_FIREBASE_CONFIG={ "apiKey": "AIzaSyAuLQR9SV5LsVxjU8wh9hvFLdhcAHU6cxE", "authDomain": "rome-prod-1.firebaseapp.com", "projectId": "rome-prod-1", "storageBucket": "rome-prod-1.appspot.com", "messagingSenderId": "147786367145", "appId": "1:147786367145:web:9d4cba68071c3f29a8a9b8", "measurementId": "G-G8Z9DRHTZS"} REACT_APP_CLOUDINARY_ENDPOINT_API=https://api.cloudinary.com/v1_1/bodyshop @@ -8,6 +8,6 @@ REACT_APP_CLOUDINARY_API_KEY=473322739956866 REACT_APP_CLOUDINARY_THUMB_TRANSFORMATIONS=c_fill,h_250,w_250 REACT_APP_FIREBASE_PUBLIC_VAPID_KEY='BP1B7ZTYpn-KMt6nOxlld6aS8Skt3Q7ZLEqP0hAvGHxG4UojPYiXZ6kPlzZkUC5jH-EcWXomTLtmadAIxurfcHo' REACT_APP_STRIPE_PUBLIC_KEY=pk_test_51GqB4TJl3nQjrZ0wCQWAxAhlNF8jKe0tipIa6ExBaxwJGitwvFsIZUEua4dUzaMIAuXp4qwYHXx7lgjyQSwP0Pe900vzm38C7g -REACT_APP_AXIOS_BASE_API_URL=https://api.imex.online/ -REACT_APP_REPORTS_SERVER_URL=https://reports.imex.online +REACT_APP_AXIOS_BASE_API_URL=https://api.romeonline.io/ +REACT_APP_REPORTS_SERVER_URL=https://reports.romeonline.io REACT_APP_SPLIT_API=et9pjkik6bn67he5evpmpr1agoo7gactphgk \ No newline at end of file diff --git a/client/src/landing/data.source.js b/client/src/landing/data.source.js index 257d14c46..a50c1b9a8 100644 --- a/client/src/landing/data.source.js +++ b/client/src/landing/data.source.js @@ -1064,7 +1064,7 @@ export const Footer10DataSource = { className: "copyright", children: ( - ©2023 ImEX Systems + ©2023 Rome Technologies ), }, diff --git a/client/src/redux/email/email.reducer.js b/client/src/redux/email/email.reducer.js index df0a1d14e..5c114bc62 100644 --- a/client/src/redux/email/email.reducer.js +++ b/client/src/redux/email/email.reducer.js @@ -3,7 +3,7 @@ import EmailActionTypes from "./email.types"; const INITIAL_STATE = { emailConfig: { messageOptions: { - from: { name: "ShopName", address: "noreply@bodyshop.app" }, + from: { name: "ShopName", address: "noreply@romeonline.io" }, to: null, replyTo: null, }, diff --git a/client/src/utils/TemplateConstants.js b/client/src/utils/TemplateConstants.js index ca5ebf39b..aab4b9069 100644 --- a/client/src/utils/TemplateConstants.js +++ b/client/src/utils/TemplateConstants.js @@ -2,7 +2,7 @@ import i18n from "i18next"; //import { store } from "../redux/store"; export const EmailSettings = { fromNameDefault: "Rome Online", - fromAddress: "noreply@imex.online", + fromAddress: "noreply@rome.online", }; export const TemplateList = (type, context) => { diff --git a/server/email/sendemail.js b/server/email/sendemail.js index ceabb9532..0a847df77 100644 --- a/server/email/sendemail.js +++ b/server/email/sendemail.js @@ -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} `, + from: `Rome Online API - ${process.env.NODE_ENV} `, 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 `, + from: `Rome Online `, 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 `, + from: `Rome Online `, 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) =>