Skip to content

Commit

Permalink
fix: skip mails to test@test.com
Browse files Browse the repository at this point in the history
  • Loading branch information
JoseAlbDR committed Apr 5, 2024
1 parent 6c5a097 commit abc1943
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/services/email.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,12 @@ export class EmailService {
private async sendEmail(options: SendMailOptions): Promise<boolean> {
const { to, subject, htmlBody, attachments: attachments = [] } = options;

if (
(typeof to === 'string' && to === 'test@test.com') ||
to.includes('test@test.com')
)
return false;

try {
const sentInformation = await this.transporter.sendMail({
to: to,
Expand Down

0 comments on commit abc1943

Please sign in to comment.