From 3c37c2e77475dfbde78f7cd1d2e2055ecb728460 Mon Sep 17 00:00:00 2001 From: zomars Date: Mon, 16 May 2022 09:49:17 -0600 Subject: [PATCH] Skip sending emails in E2E --- apps/web/lib/emails/templates/_base-email.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/web/lib/emails/templates/_base-email.ts b/apps/web/lib/emails/templates/_base-email.ts index 2e73025d..3cd5b44e 100644 --- a/apps/web/lib/emails/templates/_base-email.ts +++ b/apps/web/lib/emails/templates/_base-email.ts @@ -10,6 +10,7 @@ export default class BaseEmail { return {}; } public sendEmail() { + if (process.env.NEXT_PUBLIC_IS_E2E) return new Promise((r) => r("Skipped sendEmail for E2E")); new Promise((resolve, reject) => nodemailer .createTransport(this.getMailerOptions().transport)