{"record":{"id":"8955cd31f6fdb184","repo":"Budibase/budibase","slug":"please-contact-your-platform-administrator-smtp-i","errorCode":null,"errorMessage":"Please contact your platform administrator, SMTP is not configured.","messagePattern":"Please contact your platform administrator, SMTP is not configured\\.","errorType":"http","errorClass":"HTTPError","httpStatus":400,"severity":"error","filePath":"packages/worker/src/sdk/auth/auth.ts","lineNumber":58,"sourceCode":"    invalidatedSessionCount: sessionResult.invalidatedSessionCount,\n  }\n}\n\nexport async function logout(opts: PlatformLogoutOpts) {\n  // TODO: This should be moved out of core and into worker only\n  // account-portal can call worker endpoint\n  return authCore.platformLogout(opts)\n}\n\n// PASSWORD MANAGEMENT\n\n/**\n * Reset the user password, used as part of a forgotten password flow.\n */\nexport const reset = async (email: string) => {\n  const configured = await emails.isEmailConfigured()\n  if (!configured) {\n    throw new HTTPError(\n      \"Please contact your platform administrator, SMTP is not configured.\",\n      400\n    )\n  }\n\n  const user = await userSdk.core.getGlobalUserByEmail(email)\n  // exit if user doesn't exist\n  if (!user) {\n    return\n  }\n\n  // exit if user has sso\n  if (await userSdk.db.isPreventPasswordActions(user)) {\n    return\n  }\n\n  // send password reset\n  await emails.sendEmail(email, EmailTemplatePurpose.PASSWORD_RECOVERY, {","sourceCodeStart":40,"sourceCodeEnd":76,"githubUrl":"https://github.com/Budibase/budibase/blob/a81a902e9a8fe55b467d106765f6638f12e35c49/packages/worker/src/sdk/auth/auth.ts#L40-L76","documentation":"The password reset flow sends an email containing the reset link, so it requires a configured email transport. reset checks emails.isEmailConfigured() and, if no SMTP configuration exists for the tenant, throws an HTTPError 400 telling the requester to contact their platform administrator.","triggerScenarios":"POSTing to the forgotten-password / reset endpoint when the tenant/workspace has no SMTP configuration set up (no admin-configured email settings and no fallback SMTP env vars).","commonSituations":"Fresh self-hosted install where SMTP was never configured; cloud tenant where the admin hasn't set up email; SMTP config was deleted or credentials expired so isEmailConfigured returns false; users attempting password recovery before admin onboarding completed.","solutions":["Configure SMTP in the workspace/platform admin email settings (host, port, user, password, from address)","Set the SMTP environment variables (SMTP_HOST, SMTP_PORT, SMTP_USER, SMTP_PASSWORD) for self-hosted deployments","Verify the email config is saved for the correct tenant and hasn't been disabled","As an admin, use an alternative account-recovery path while SMTP is unavailable"],"exampleFix":"// environment before\n# (no SMTP vars set)\n// after (self-hosted .env)\nSMTP_HOST=smtp.example.com\nSMTP_PORT=587\nSMTP_USER=no-reply@example.com\nSMTP_PASSWORD=secret","handlingStrategy":"try-catch","validationCode":"const configured = await emails.isEmailConfigured()\nif (!configured) throw new Error(\"SMTP must be configured before password resets\")","typeGuard":"null","tryCatchPattern":"try {\n  await api.requestPasswordReset(email)\n} catch (e) {\n  if (e.message.includes(\"SMTP is not configured\")) {\n    notify(\"Email is not set up for this platform; contact your administrator\")\n  }\n}","preventionTips":["Configure SMTP during initial platform setup","Monitor isEmailConfigured in health checks","Keep SMTP credentials valid and rotated before expiry"],"tags":["email","smtp","configuration","password-reset"],"backgroundTag":"smtp-not-configured","analyzedSha":"a81a902e9a8fe55b467d106765f6638f12e35c49","analyzedAt":"2026-08-29T01:03:10.972Z","schemaVersion":2},"datasetVersion":"2026-08-29T02:17:18.158Z"}