fix: error should not be thrown if SMTP is unconfigured (#5524)

This commit is contained in:
Matti Nannt
2025-04-28 16:48:14 +09:00
committed by GitHub
parent 8c1b9f81b9
commit 8d45d24d55

View File

@@ -50,6 +50,10 @@ interface SendEmailDataProps {
}
export const sendEmail = async (emailData: SendEmailDataProps): Promise<boolean> => {
if (!IS_SMTP_CONFIGURED) {
logger.info("SMTP is not configured, skipping email sending");
return false;
}
try {
const transporter = createTransport({
host: SMTP_HOST,