SMTP Error 500 - Syntax error — command unrecognized. | Warmup Inbox

The short answer

SMTP 500 means "syntax error, command unrecognized": a permanent failure where the receiving server could not parse the command your client sent. It is almost never the message content. Usually the client spoke the wrong protocol on the wrong port (plaintext on an implicit-TLS port, or TLS into a plaintext port), sent a malformed or over-long command, or a proxy mangled the session. Match the port to the encryption mode.

Quick fix

Check your mail client or relay config and any security software sitting between you and the server.

5 - Permanent. The server will not try again. Fix the cause before you resend.

What it means

500 is defined in RFC 5321 as "Syntax error, command unrecognized (this may include errors such as command line too long)." It is a permanent failure: the leading 5 means the command was not accepted, and the second digit 0 means the problem is with the SMTP protocol itself. Because it is permanent, resending the exact same command will not help; something about how the command is sent has to change. In enhanced-code terms this maps to 5.5.2 (syntax error).

Common causes

How to fix it

  1. Match the port to the encryption mode
    Use 465 with implicit TLS, or 587 (or 25 for server-to-server) with STARTTLS. Do not start TLS on 465 or send plaintext on 465. In Nodemailer use secure: true for 465 and secure: false for 587; in Python use SMTP_SSL for 465 and starttls() for 587.

  2. Capture the exact failing command
    Enable protocol logging (Nodemailer logger and debug true; Python set_debuglevel(1)) and read which verb drew the 500. The line just before the 500 is the culprit.

  3. Validate command formatting
    Ensure every command ends in CRLF, is ASCII (use SMTPUTF8 or 8BITMIME only if the server advertised it), and stays under 512 octets. If you author SMTP by hand, switch to a maintained library.

  4. Send EHLO first, fall back to HELO
    If the server does not recognize EHLO, the client should fall back to HELO. Good libraries do this automatically.

  5. Bypass interfering middleware to isolate it
    Test from a host without an SMTP-scanning antivirus or proxy, or exempt the mail port, to confirm whether a security appliance is rewriting the session. Re-enable it and add a proper exception afterward.

Common questions

Related codes

All SMTP error codes

Ready when you are

Most rejections come back to sender reputation.

Blocklists, auth failures, and policy blocks are what warmup prevents. Warm up your domain so your mail is trusted before you hit send.