appsmithorg/appsmith · warning · Error

Failed to send error mail. Email provider is not configured,

Error message

Failed to send error mail. Email provider is not configured, please refer to https://docs.appsmith.com/setup/instance-configuration/email to configure it.

What it means

Thrown by sendBackupErrorToAdmins() in mailer.ts. It reads six APPSMITH_MAIL_* vars (ENABLED, FROM, HOST, PORT, USERNAME, PASSWORD); if ANY is falsy it throws this message, because without a fully configured SMTP provider the error-notification email cannot be sent. Note this is the first (broadest) of three mail branches.

Source

Thrown at app/client/packages/rts/src/ctl/mailer.ts:25

  const mailEnabled = process.env.APPSMITH_MAIL_ENABLED;
  const mailFrom = process.env.APPSMITH_MAIL_FROM;
  const mailHost = process.env.APPSMITH_MAIL_HOST;
  const mailPort = process.env.APPSMITH_MAIL_PORT;
  const mailUser = process.env.APPSMITH_MAIL_USERNAME;
  const mailPass = process.env.APPSMITH_MAIL_PASSWORD;
  const mailTo = process.env.APPSMITH_ADMIN_EMAILS;

  console.log("Sending Error mail to admins.");
  try {
    if (
      !mailEnabled ||
      !mailFrom ||
      !mailHost ||
      !mailPort ||
      !mailUser ||
      !mailPass
    ) {
      throw new Error(
        "Failed to send error mail. Email provider is not configured, please refer to https://docs.appsmith.com/setup/instance-configuration/email to configure it.",
      );
    } else if (!mailTo) {
      throw new Error(
        "Failed to send error mail. Admin email(s) not configured, please refer to https://docs.appsmith.com/setup/instance-configuration/disable-user-signup#administrator-emails to configure it.",
      );
    } else if (!mailEnabled) {
      throw new Error(
        "Mail not sent! APPSMITH_MAIL_ENABLED env val is disabled, please refer to https://docs.appsmith.com/setup/instance-configuration/email to enable it.",
      );
    } else {
      const backupFiles = await utils.listLocalBackupFiles();
      const lastBackupfile = backupFiles.pop();
      const lastBackupTimestamp = lastBackupfile.match(
        /appsmith-backup-(.*)\.tar.gz/,
      )[1];
      const lastBackupPath = Constants.BACKUP_PATH + "/" + lastBackupfile;

View on GitHub (pinned to 8cd9021c24)

Solutions

  1. Set all six vars in /appsmith-stacks/runtime.env (or container env): APPSMITH_MAIL_ENABLED=true plus FROM, HOST, PORT, USERNAME, PASSWORD.
  2. Reload the env / restart the RTS process so the new values are read.
  3. Use a transactional SMTP provider (Mailgun/SES/SendGrid) credentials and confirm PORT matches TLS (465/587).
  4. Validate by sending a test mail via the Appsmith admin settings UI, which exercises the same config.

Example fix

# before
APPSMITH_MAIL_ENABLED=true
APPSMITH_MAIL_HOST=smtp.example.com
# (PORT / USERNAME / PASSWORD missing)

# after
APPSMITH_MAIL_ENABLED=true
APPSMITH_MAIL_FROM=noreply@example.com
APPSMITH_MAIL_HOST=smtp.example.com
APPSMITH_MAIL_PORT=587
APPSMITH_MAIL_USERNAME=postmaster@example.com
APPSMITH_MAIL_PASSWORD=********
Defensive patterns

Strategy: validation

Validate before calling

const required = ['APPSMITH_MAIL_ENABLED','APPSMITH_MAIL_FROM','APPSMITH_MAIL_HOST','APPSMITH_MAIL_PORT','APPSMITH_MAIL_USERNAME','APPSMITH_MAIL_PASSWORD'];
const missing = required.filter(k => !process.env[k]);
if (missing.length) throw new Error(`Missing mail config: ${missing.join(', ')}`);

Type guard

const isMailConfigured = (env: NodeJS.ProcessEnv): boolean =>
  Boolean(env.APPSMITH_MAIL_ENABLED && env.APPSMITH_MAIL_FROM && env.APPSMITH_MAIL_HOST && env.APPSMITH_MAIL_PORT && env.APPSMITH_MAIL_USERNAME && env.APPSMITH_MAIL_PASSWORD);

Try / catch

try { await sendBackupErrorToAdmins(err, ts); } catch (e) {
  if (/Email provider is not configured/i.test(e.message)) { log.warn('Skipping admin mail: SMTP not configured'); }
  else throw e;
}

Prevention

When it happens

Trigger: A backup fails and the RTS tries to email admins, but one or more of APPSMITH_MAIL_ENABLED/FROM/HOST/PORT/USERNAME/PASSWORD is unset or empty in the environment.

Common situations: Fresh install where email was never configured; partial config (HOST set but PORT missing); secret-injection system (Docker secret/K8s secret) that failed to populate APPSMITH_MAIL_PASSWORD; APPSMITH_MAIL_ENABLED set to a falsy string.

Related errors


AI-assisted analysis of appsmithorg/appsmith@8cd9021c24 (2026-08-12). Data as JSON: /api/errors/eae5e9d2f52eb663. Report an issue: GitHub.