From 8d45d24d55e18b206189ca2e9133fdce1b932404 Mon Sep 17 00:00:00 2001 From: Matti Nannt Date: Mon, 28 Apr 2025 16:48:14 +0900 Subject: [PATCH] fix: error should not be thrown if SMTP is unconfigured (#5524) --- apps/web/modules/email/index.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/apps/web/modules/email/index.tsx b/apps/web/modules/email/index.tsx index d2fcd8932c..8ccb691000 100644 --- a/apps/web/modules/email/index.tsx +++ b/apps/web/modules/email/index.tsx @@ -50,6 +50,10 @@ interface SendEmailDataProps { } export const sendEmail = async (emailData: SendEmailDataProps): Promise => { + if (!IS_SMTP_CONFIGURED) { + logger.info("SMTP is not configured, skipping email sending"); + return false; + } try { const transporter = createTransport({ host: SMTP_HOST,