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
- Set all six vars in /appsmith-stacks/runtime.env (or container env): APPSMITH_MAIL_ENABLED=true plus FROM, HOST, PORT, USERNAME, PASSWORD.
- Reload the env / restart the RTS process so the new values are read.
- Use a transactional SMTP provider (Mailgun/SES/SendGrid) credentials and confirm PORT matches TLS (465/587).
- 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
- Configure all six mail vars in runtime.env at install time.
- Use the admin settings UI to validate SMTP end-to-end.
- Treat a missing mail config as a warning, not a fatal backup failure.
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
- Failed to send error mail. Admin email(s) not configured, pl
- Mail not sent! APPSMITH_MAIL_ENABLED env val is disabled, pl
- Database URL not found. Please check APPSMITH_DB_URL or APPS
- Redis URL not found. Please check APPSMITH_REDIS_URL configu
- The NODE_ENV environment variable is required but was not sp
AI-assisted analysis of appsmithorg/appsmith@8cd9021c24 (2026-08-12).
Data as JSON: /api/errors/eae5e9d2f52eb663.
Report an issue: GitHub.