diff --git a/apps/api/src/mail/services/interface.service.ts b/apps/api/src/mail/services/interface.service.ts index 7f4e2689..61dfc95d 100644 --- a/apps/api/src/mail/services/interface.service.ts +++ b/apps/api/src/mail/services/interface.service.ts @@ -18,4 +18,10 @@ export interface IMailService { adminUserCreateEmail(email: string): Promise feedbackEmail(email: string, feedback: string): Promise + + projectRemoval( + email: string, + projectName: string, + removedOn: string + ): Promise } diff --git a/apps/api/src/mail/services/mail.service.ts b/apps/api/src/mail/services/mail.service.ts index d216f705..13d84074 100644 --- a/apps/api/src/mail/services/mail.service.ts +++ b/apps/api/src/mail/services/mail.service.ts @@ -158,6 +158,109 @@ export class MailService implements IMailService { await this.sendEmail(email, subject, body) } + async projectRemoval( + email: string, + projectName: string, + removedOn: string + ): Promise { + const subject = 'Project Removal Notification' + const body = ` + + + + + + + + + +
+

Project Removal Notification

+

Dear User,

+

We hope this email finds you well. We wanted to inform you that your access to the following project has been removed:

+ + + + + + + + + +
Project Name:${projectName}
Removed On:${removedOn}
+

If you believe this action was taken in error or have any questions regarding this change, please don't hesitate to contact your project administrator or our support team.

+

We appreciate your understanding and thank you for your contributions to the project.

+

Best regards,
Team Keyshade

+
+ +
+ + + ` + await this.sendEmail(email, subject, body) + } + private async sendEmail( email: string, subject: string, diff --git a/apps/api/src/mail/services/mock.service.ts b/apps/api/src/mail/services/mock.service.ts index 003cb520..072ac8d7 100644 --- a/apps/api/src/mail/services/mock.service.ts +++ b/apps/api/src/mail/services/mock.service.ts @@ -38,4 +38,14 @@ export class MockMailService implements IMailService { async sendEmailChangedOtp(email: string, otp: string): Promise { this.log.log(`Email change OTP for email ${email} is ${otp}`) } + + async projectRemoval( + email: string, + projectName: string, + removedOn: string + ): Promise { + this.log.log( + `User with email ${email} has been removed from project ${projectName} on ${removedOn}` + ) + } }