n8n-io/n8n · error · InternalServerError
Please contact your administrator: ${error.message}
Error message
Please contact your administrator: ${error.message} What it means
The password-reset email could not be sent and the underlying failure from the mailer is wrapped as a 500 InternalServerError with the original error message appended. n8n re-surfaces the mailer's message directly because the cause is almost always mail infrastructure (SMTP connection, authentication, relay rejection).
Source
Thrown at packages/cli/src/controllers/password-reset.controller.ts:143
}
const url = this.authService.generatePasswordResetUrl(user);
const { id, firstName } = user;
try {
await this.mailer.passwordReset({
email,
firstName,
passwordResetUrl: url,
});
} catch (error) {
this.eventService.emit('email-failed', {
user,
messageType: 'Reset password',
publicApi: false,
});
if (error instanceof Error) {
throw new InternalServerError(
`Please contact your administrator: ${error.message}`,
error,
);
}
}
this.logger.info('Sent password reset email successfully', { userId: user.id, email });
this.eventService.emit('user-transactional-email-sent', {
userId: id,
messageType: 'Reset password',
publicApi: false,
});
this.eventService.emit('user-password-reset-request-click', { user });
} catch (error) {
// Catch any unexpected errors to prevent information leakage
this.errorReporter.error(
new Error('Unexpected error in forgot password endpoint', { cause: error }),View on GitHub (pinned to 5ac6606e81)
Solutions
- Verify the SMTP env vars (host, port, user, pass, sender) and that the credentials are still valid.
- Test SMTP connectivity from the n8n host (telnet/openssl to the SMTP host:port) and check firewall/egress rules.
- Inspect server logs for the original mailer error message that is appended to 'Please contact your administrator:'.
- In local dev, start the mailpit container (pnpm --filter n8n-containers services --services mailpit) and point SMTP at it.
Example fix
// before: missing/misconfigured mailer // .env // N8N_EMAIL_MODE=smtp // N8N_SMTP_HOST=smtp.example.com // N8N_SMTP_PORT=587 // after N8N_EMAIL_MODE=smtp N8N_SMTP_HOST=smtp.example.com N8N_SMTP_PORT=587 N8N_SMTP_USER=apikey N8N_SMTP_PASS=<secret-from-env-not-arg> N8N_SMTP_SENDER=noreply@example.com N8N_SMTP_SSL_STRICT=true
Defensive patterns
Strategy: try-catch
Validate before calling
// Pre-flight: verify SMTP env vars are set before relying on the flow.
function smtpConfigured(env = process.env) {
return Boolean(env.N8N_SMTP_HOST && env.N8N_SMTP_PORT);
}
// optionally open a test SMTP connection from the host before invoking reset Try / catch
try {
await api.post('/forgot-password', { email });
} catch (e) {
if (e.status === 500 && /Please contact your administrator/.test(e.message)) {
// surface the appended mailer message and alert ops to check SMTP
} else { throw e; }
} Prevention
- Run SMTP connectivity checks as part of deployment health checks.
- Keep secrets in env vars, never on the command line.
- Use mailpit in dev so the mailer path always has a target.
When it happens
Trigger: mailer.passwordReset() throws inside the password-reset controller — SMTP connection refused, auth credentials rejected by the relay, recipient address refused, or the mail provider timing out.
Common situations: N8N_SMTP_* / N8N_EMAIL_* env vars missing or wrong; outbound network/egress to the SMTP host blocked; in dev the mailpit/maildev container is not running; relay rate-limits or blocks the n8n host.
Related errors
- Email sending must be set up in order to request a password
- Reflector output did not contain a JSON object
- MCP server "${cfg.name}": exactly one of "url" or "command"
- MCP server "${cfg.name}": provide either "url" or "command",
- MCP server name "${cfg.name}" is already registered
AI-assisted analysis of n8n-io/n8n@5ac6606e81 (2026-08-12).
Data as JSON: /api/errors/043312f4edeac620.
Report an issue: GitHub.