diff --git a/src/controllers/connection/__tests__/newConnection.test.ts b/src/controllers/connection/__tests__/newConnection.test.ts index 445fbd97..a5e49641 100644 --- a/src/controllers/connection/__tests__/newConnection.test.ts +++ b/src/controllers/connection/__tests__/newConnection.test.ts @@ -369,7 +369,7 @@ describe('NewConnectionController', () => { }) expect(emailSpy.secondCall.args[1]?.pin).match(/[0-9]{6}/) expect(emailSpy.secondCall.args[1]).to.deep.contain({ - invitator: 'NAME', + receiver: 'NAME', address: 'NAME, ADDRESS_LINE_1, ADDRESS_LINE_2, CARE_OF, LOCALITY, PO_BOX, POSTAL_CODE, COUNTRY, PREMISES, REGION', }) @@ -555,7 +555,7 @@ describe('NewConnectionController', () => { expect(emailSpy.firstCall.args[0]).equal('connection_invite_admin') expect(emailSpy.firstCall.args[1]?.pin).match(/[0-9]{6}/) expect(emailSpy.firstCall.args[1]).to.deep.contain({ - invitator: 'NAME', + receiver: 'NAME', address: 'NAME, ADDRESS_LINE_1, ADDRESS_LINE_2, CARE_OF, LOCALITY, PO_BOX, POSTAL_CODE, COUNTRY, PREMISES, REGION', }) diff --git a/src/controllers/connection/newConnection.ts b/src/controllers/connection/newConnection.ts index 85e1c11c..e5232106 100644 --- a/src/controllers/connection/newConnection.ts +++ b/src/controllers/connection/newConnection.ts @@ -407,7 +407,7 @@ export class NewConnectionController extends HTMLController { private async sendAdminEmail(company: CompanyProfile, pin: string) { await neverFail( this.email.sendMail('connection_invite_admin', { - invitator: company.company_name, + receiver: company.company_name, address: [ company.company_name, company.registered_office_address.address_line_1, diff --git a/src/models/emailServiceInt/templates/invitationAdmin.tsx b/src/models/emailServiceInt/templates/invitationAdmin.tsx index 74bc6d1c..c0896a6f 100644 --- a/src/models/emailServiceInt/templates/invitationAdmin.tsx +++ b/src/models/emailServiceInt/templates/invitationAdmin.tsx @@ -8,20 +8,21 @@ export default { name: 'connection_invite_admin' as const, template: async function ( env: Env, - params: { pin: string; invitator: string; address: string } + params: { pin: string; receiver: string; address: string } ): Promise { const companyHouse = new CompanyHouseEntity(env) const localCompany = await companyHouse.localCompanyHouseProfile() return { to: env.get('EMAIL_ADMIN_ADDRESS'), from: env.get('EMAIL_FROM_ADDRESS'), - subject: `Postal Code for Verification: Invitation from ${params.invitator} on Veritable`, + subject: `Postal Code for Verification: Invitation from ${params.receiver} on Veritable`, text: ` - Hi ${localCompany.company_name}, - ${params.invitator} as sent you a request to connect securely on Veritable. To complete the verification process, please enter the following 6-digit postal code within your Veritable instance. + Hi ${localCompany.company_name} Admin, + Please post this verification code to ${params.receiver}, to complete the verification process. - Verification Code: ${params.pin}, Address: ${params.address} + + Verification Code: ${params.pin}, `, html: await ( <> @@ -29,7 +30,7 @@ export default {

{Html.escapeHtml( - `${params.invitator} as sent you a request to connect securely on Veritable. To complete the verification process, please enter the following 6-digit postal code within your Veritable instance.` + `Please post this verification code to ${params.receiver}, to complete the verification process.` )}