{"record":{"id":"419b961dd8942992","repo":"windmill-labs/windmill","slug":"smtp-is-not-enabled","errorCode":null,"errorMessage":"SMTP is not enabled","messagePattern":"SMTP is not enabled","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"backend/windmill-api/src/jobs.rs","lineNumber":2671,"sourceCode":"        send_email.runnable_path.as_deref(),\n        recipients,\n        &send_email.error,\n    )\n    .await?;\n\n    Ok(Json(resp))\n}\n\n#[cfg(not(all(feature = \"enterprise\", feature = \"instance_smtp\")))]\nasync fn send_email_with_instance_smtp(\n    _authed: ApiAuthed,\n    Extension(_db): Extension<DB>,\n    Path(_w_id): Path<String>,\n    Json(_send_email): Json<SendEmail>,\n) -> error::Result<Json<String>> {\n    tracing::warn!(\"SMTP is not enabled, skipping workspace trigger failure email notification\",);\n\n    return Err(anyhow::anyhow!(\"SMTP is not enabled\").into());\n}\n\n#[cfg(all(feature = \"enterprise\", feature = \"parquet\"))]\nasync fn get_logs_from_store(\n    log_offset: i32,\n    logs: &str,\n    log_file_index: &Option<Vec<String>>,\n) -> Option<error::Result<Body>> {\n    use futures::StreamExt;\n    let stream =\n        windmill_object_store::get_logs_from_store(log_offset, logs, log_file_index).await?;\n    let header = bytes::Bytes::from(\n        r#\"to remove ansi colors, use: | sed 's/\\x1B\\[[0-9;]\\{1,\\}[A-Za-z]//g'\n\"#\n        .to_string(),\n    );\n    let prefixed_stream = futures::stream::once(async { Ok(header) }).chain(stream);\n    Some(Ok(Body::from_stream(prefixed_stream)))","sourceCodeStart":2653,"sourceCodeEnd":2689,"githubUrl":"https://github.com/windmill-labs/windmill/blob/e474e8803ce2ff5c2df09a58dab51d45f5c922ca/backend/windmill-api/src/jobs.rs#L2653-L2689","documentation":"This endpoint stub (the non-enterprise/non-parquet build of the workspace trigger failure email handler) always rejects requests when SMTP support is compiled out or not configured. Windmill only sends trigger failure email notifications when an SMTP mailer is available, so without it the route logs a warning and returns an error instead of sending mail.","triggerScenarios":"POSTing to the workspace trigger failure email notification endpoint on a build without the enterprise+parquet features, or with no SMTP mailer configured for the instance.","commonSituations":"Self-hosted community-edition Windmill with no SMTP settings; enterprise features disabled at compile time; calling an automation/email webhook expecting mail delivery when mailer setup was skipped.","solutions":["Configure an SMTP mailer in instance/workspace settings so email notifications can be sent","Run a Windmill build with the enterprise and parquet features if email notifications are required","Route failure notifications to Slack/webhooks instead of email, which do not need SMTP","Suppress the calling automation on this workspace since email delivery is unsupported there"],"exampleFix":"// before\ncurl -X POST $BASE/api/w/$WORKSPACE/jobs/send_email ...\n// after\n# configure SMTP first, or use a webhook channel:\ncurl -X POST $SLACK_WEBHOOK -d '{\"text\":\"job failed\"}'","handlingStrategy":"fallback","validationCode":"// check instance mailer config before calling\nconst settings = await client.getInstanceSettings();\nif (!settings.smtp_configured) {\n  console.warn('SMTP disabled: use webhook notification instead');\n  return;","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Configure SMTP in instance settings before enabling email automations","Prefer webhook/Slack notifications on community edition","Feature-detect the email capability instead of assuming it"],"tags":["smtp","email","configuration","enterprise"],"backgroundTag":"missing-env-var","analyzedSha":"e474e8803ce2ff5c2df09a58dab51d45f5c922ca","analyzedAt":"2026-09-03T12:38:19.024Z","contentChangedAt":"2026-09-03T12:38:19.024Z","schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}