SMTP
SMTP error 501 means "syntax error in parameters or arguments" — the address or argument on a MAIL FROM/RCPT TO command is malformed. Here's how to fix it.
Updated Jun 26, 2026
The short answer
SMTP error 501 is a permanent failure meaning "Syntax error in parameters or arguments" (RFC 5321). The server understood the command verb but rejected its argument — usually a malformed MAIL FROM/RCPT TO address, missing angle brackets, stray whitespace, or illegal characters. Fix it by correcting the address syntax (e.g. <user@example.com>) so the command's parameter is well-formed, then resend.
SMTP reply code 501 is a permanent ("5yz") negative reply defined in RFC 5321 §4.2.3 as "Syntax error in parameters or arguments." Crucially, this is different from 500: with a 501 the server recognized the command verb (e.g. MAIL, RCPT, HELO) but found the argument that followed it to be malformed and unparseable. The matching enhanced status codes (RFC 3463) are 5.5.2 (Syntax error) or 5.5.4 (Invalid command arguments).
The argument supplied to an otherwise-valid command violates SMTP grammar. Common triggers:
MAIL FROM: or RCPT TO: — missing @, missing domain, a stray space, or missing angle brackets. RFC 5321 expects MAIL FROM:<user@example.com>.RCPT TO: with nothing after it, or a bare HELO/EHLO with no hostname argument.Note: 501 is about syntax, not whether the mailbox exists. A nonexistent-but-well-formed recipient produces a 550, not a 501. And an over-long command line is a separate condition: RFC 5321 §4.2.2 explicitly classes "command line too long" under 500, not 501.
501 usually names the offending command, e.g. 501 5.5.4 Syntax error in parameters or arguments (MAIL FROM). That tells you exactly which argument to correct.local@domain with no leading/trailing whitespace, and (when issuing raw SMTP) wrapped in angle brackets:MAIL FROM:<sender@yourdomain.com>RCPT TO:<recipient@example.com>
Strip display names and commas; send one address per RCPT TO.
@, enforce ≤64-octet local-part and ≤255-octet domain) so a bad value never reaches the SMTP conversation.EHLO/HELO is followed by a valid hostname or address literal, and that any ESMTP parameters (e.g. SIZE=, BODY=) use valid values.<CRLF>) at 512 octets. Exceeding it is reported as a 500 ("command line too long") rather than a 501, but the remedy is the same: if a header or argument is very long, restructure it rather than emitting one oversized line.If you build the SMTP conversation yourself, the most reliable fix is to stop hand-constructing envelope addresses and let a vetted library (Nodemailer, Python smtplib/email) or an API assemble RFC-compliant commands for you. Courier does this on your behalf, validating recipient data before it reaches the provider so syntactically broken addresses are caught early.
Note: 501 is unrelated to authentication or "Less Secure Apps." If you reached this page chasing a Gmail/Workspace auth failure, that is a different error class — use an App Password (with 2-Step Verification) or OAuth2 over port 587 (STARTTLS) or 465 (implicit TLS); both ports are valid per RFC 8314.
References
FAQ
No. 500 means the command verb itself was unrecognized or malformed; 501 means the verb was understood but its parameter/argument is syntactically invalid (e.g. a bad address in MAIL FROM or RCPT TO). Both are permanent 5yz failures, but 501 points you at the argument, not the command name.
One API, every provider
Courier connects to your email, SMS, and push providers, handles retries and failover, and surfaces delivery errors in plain language.
Reply-code definitions per RFC 5321 §4.2.3. Last reviewed Jun 26, 2026. Courier is not affiliated with third-party providers; error behavior may vary by implementation.
© 2026 Courier. All rights reserved.