mirror of
https://github.com/Portabase/portabase.git
synced 2026-07-14 11:16:13 +02:00
fix: Do not crash if no email config is provided in .env file.
This commit is contained in:
@@ -41,6 +41,11 @@ export const sendEmail = async (data: Payload) => {
|
||||
throw new Error("SMTP system settings not found.");
|
||||
}
|
||||
|
||||
if (!settings.smtpHost || !settings.smtpPort || !settings.smtpUser || !settings.smtpPassword || !settings.smtpFrom) {
|
||||
console.warn("Incomplete SMTP settings. Email not sent.");
|
||||
return;
|
||||
}
|
||||
|
||||
const emailsArray = data.to.split(",")
|
||||
.map(email => email.trim());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user