diff --git a/packages/builder/src/pages/builder/portal/manage/email/index.svelte b/packages/builder/src/pages/builder/portal/manage/email/index.svelte index 56242f0fe4..057620f6ad 100644 --- a/packages/builder/src/pages/builder/portal/manage/email/index.svelte +++ b/packages/builder/src/pages/builder/portal/manage/email/index.svelte @@ -68,6 +68,26 @@ } } + async function clearSmtp() { + // Delete the SMTP config + try { + await API.deleteConfig({ + id: smtpConfig._id, + rev: smtpConfig._rev, + }) + smtpConfig = { + config: {}, + } + await admin.getChecklist() + notifications.success(`Settings cleared`) + analytics.captureEvent(Events.SMTP.SAVED) + } catch (error) { + notifications.error( + `Failed to clear email settings, reason: ${error?.message || "Unknown"}` + ) + } + } + async function fetchSmtp() { loading = true try { @@ -156,8 +176,9 @@ {/if} -