SMTP 501: syntax error in parameters or arguments
The server recognized the command but rejected its argument: usually a badly formatted email address or an invalid HELO/EHLO host name.
501 5.5.4 Empty HELO/EHLO argument not allowed, closing connection.
Start of one of Gmail's 501 texts, as listed in Google's SMTP errors reference.
What 501 means
RFC 5321 defines 501 as "Syntax error in parameters or arguments". Unlike a 500, the command itself was fine: the server objected to what came after it.
The usual suspects are the address in MAIL FROM or RCPT TO and the name in HELO or EHLO. An address with spaces, missing angle brackets, two @ signs or illegal characters gets a 501 from strict servers. Gmail documents 501 5.5.4 for an invalid or empty HELO/EHLO argument and 501 5.5.2 for a response it cannot decode. RFC 5321's size-limit section also shows "501 Path too long" as an example reply.
If people get a 501 when sending from an email program, check the recipient address for typos and stray characters first. If an application or device gets it, check how it names itself in HELO/EHLO: it should send its own fully qualified host name, not an empty value or a bare word.
Likely causes
- A recipient or sender address with invalid characters, spaces or missing brackets.
- An empty or invalid HELO/EHLO host name.
- An address or path longer than the server accepts.
- A malformed authentication response.
How to fix it
If you sent the message
- Check the address you typed for spaces, extra punctuation or a second @.
- Configure the sending server or device to announce its fully qualified host name in HELO/EHLO.
- Update or reconfigure software that builds SMTP commands itself.
If you're the recipient or their admin
- No action is usually needed: the problem is in how the message was sent.
Frequently asked questions
What does a 501 error on HELO mean?
The receiving server didn't accept the host name your server introduced itself with. Configure the sending server to use its fully qualified domain name, ideally the same name its PTR record points to.
What's the difference between SMTP 500 and 501?
A 500 means the command itself wasn't recognized. A 501 means the command was recognized, but its parameter, such as an email address or host name, was invalid.
Sources
- RFC 5321: Simple Mail Transfer Protocol (reply codes, section 4.2)
- RFC 5321, section 4.5.3.1: Size limits and minimums
- Gmail SMTP errors and codes (Google Workspace Admin Help)
Provider messages are quoted as the provider publishes them. Servers can change their wording, so the bounce you received may differ slightly.
Related codes
Related guides
Reverse DNS and PTR records for mail servers
What a PTR record is, why Gmail, Yahoo and others require forward-confirmed reverse DNS for sending IPs, who can set it, and how to check yours is right.
8 min read Running email day to dayHow to read email headers
Read email headers step by step: the Received chain from the bottom up, Authentication-Results, ARC, Return-Path, Message-ID and Microsoft 365 anti-spam fields.
10 min read SPF, DKIM & DMARCGmail, Yahoo and Microsoft bulk sender requirements explained
What Gmail, Yahoo and Outlook.com require from bulk senders: SPF, DKIM, DMARC, alignment, one-click unsubscribe and spam rates, with the real dates and limits.
9 min read