From d864d3f6f68b2e1293b913ecb00ad3b4e4b18517 Mon Sep 17 00:00:00 2001 From: dbarkowsky Date: Wed, 18 Dec 2024 09:25:07 -0800 Subject: [PATCH] standardize email address from PIMS system --- express-api/src/constants/config.ts | 1 + express-api/src/controllers/reports/reportsController.ts | 2 +- express-api/src/utilities/failedEmailCheck.ts | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/express-api/src/constants/config.ts b/express-api/src/constants/config.ts index 3c9e67c459..c31a4b8c72 100644 --- a/express-api/src/constants/config.ts +++ b/express-api/src/constants/config.ts @@ -27,6 +27,7 @@ const config = { }, contact: { toEmail: process.env.CONTACT_EMAIL, + systemEmail: 'PIMS System ', }, notificationTemplate: { title: 'PIMS', diff --git a/express-api/src/controllers/reports/reportsController.ts b/express-api/src/controllers/reports/reportsController.ts index 33bab37a24..4b7fc6c9ed 100644 --- a/express-api/src/controllers/reports/reportsController.ts +++ b/express-api/src/controllers/reports/reportsController.ts @@ -31,7 +31,7 @@ export const submitErrorReport = async (req: Request, res: Response) => { const email: IEmail = { to: [config.contact.toEmail], cc: [req.user.email], - from: 'pims.error@gov.bc.ca', // Made up for this purpose. + from: config.contact.systemEmail, // Made up for this purpose. bodyType: EmailBody.Html, subject: 'PIMS Error Report Submission', body: emailBody, diff --git a/express-api/src/utilities/failedEmailCheck.ts b/express-api/src/utilities/failedEmailCheck.ts index b30cdbe49f..0e0d99c107 100644 --- a/express-api/src/utilities/failedEmailCheck.ts +++ b/express-api/src/utilities/failedEmailCheck.ts @@ -67,7 +67,7 @@ const failedEmailCheck = async () => { const email: IEmail = { to: [config.contact.toEmail], cc: [], - from: 'PIMS System ', // Made up for this purpose. + from: config.contact.systemEmail, // Made up for this purpose. bodyType: EmailBody.Html, subject: 'PIMS Notifications Warning', body: emailBody,