SMTP error 501: syntax error in parameters or arguments

The command was recognized, but its arguments were invalid. Here is what causes it and how to fix it.

Permanent failureUpdated November 12, 2026
Quick answerThe command was recognized, but its arguments were invalid. It is permanent, so the message will not be retried. Most often it is caused by: a malformed address such as missing angle brackets or illegal characters.
TypePermanent (5xx)
Usually sent byAny mail server
Retry helps?No, fix first

What 501 means

The command was recognized, but its arguments were invalid. A malformed email address in MAIL FROM or RCPT TO is the most common cause.

Typical bounce message

501 5.1.3 Invalid address

The exact wording differs between providers, but the code is what matters. Many providers add a link after the text that explains their specific policy.

Common causes

  • A malformed address such as missing angle brackets or illegal characters.
  • An invalid HELO or EHLO hostname.

If you sent the email

  1. Check the recipient address for typos, spaces and extra characters.

If you manage the mail server or domain

  1. Make sure your server sends a valid fully qualified hostname in EHLO.
  2. Validate addresses before sending.

How to read this code

  • 501 is the basic SMTP reply code. The first digit, 5, means a permanent failure: retrying the same message will not help.

Because this is a permanent failure, your mail server stops trying and returns the message to you with this explanation.

501 from each side of the email

If you areWhat you seeWhat to do first
The senderA bounce message (also called a non-delivery report) in your inbox, usually within seconds or minutes.Check the recipient address for typos, spaces and extra characters
The recipientNothing. The message never reaches the inbox, so the recipient usually does not know it was sent.Tell the sender through another channel which address works, or ask your IT team to check your mailbox and filters.
The mail adminA rejected delivery in the server logs with status 5.0.0.Make sure your server sends a valid fully qualified hostname in EHLO

What the full bounce report looks like

Most mail servers send a delivery status notification in a standard format defined by RFC 3464. The human-readable part comes first, and a machine-readable part follows. For this error, the important lines look like this:

Final-Recipient: rfc822; someone@example.com
Action: failed
Status: 5.0.0
Remote-MTA: dns; mx.example.com
Diagnostic-Code: smtp; 501 5.1.3 Invalid address

Action tells you whether the server gave up (failed) or is still trying (delayed). Status is the enhanced code. Remote-MTA names the server that refused the message, which tells you whether the problem is at the recipient's provider or somewhere in between. Diagnostic-Code is the exact reply that server gave, and it is the line to copy when you ask for help.

Should you resend?

Not until something has changed. A permanent error means the receiving server looked at the message and decided it will not accept it in its current form. Sending the same message to the same address again will fail the same way, and repeated hard bounces tell mailbox providers that you do not keep your list clean. That can push your future mail into spam folders for everyone, not just for this recipient.

Fix the cause first, using the steps on this page. Then send one test message, ideally to an address you control at the same provider, before you resend to the original recipient. If you send newsletters or app notifications, remove the address from your list after the first hard bounce of this kind.

Diagnose it: 501 usually points to a protocol problem

  1. Look at your server or app logs for the exact SMTP conversation. Protocol errors come from a command the receiving server did not accept.
  2. Check that your app uses the right port and encryption: 587 with STARTTLS or 465 with implicit TLS for sending from an app.
  3. Confirm the message has valid headers and line endings. Hand-built SMTP code often sends bare line feeds instead of CRLF.

Stop it from happening again

  • Use a maintained mail library instead of writing SMTP commands yourself.
  • Test new sending code against a temporary inbox and a major provider before you send to real users.

Test your fix without bothering real people

Once you have changed a DNS record, a server setting or a message template, send a test to a free temporary inbox. It accepts mail from anywhere, shows the message within a second of arrival, and the Email X-ray on each message shows whether SPF, DKIM and DMARC passed. That tells you whether your authentication is working before you send to customers, and it keeps test messages out of real inboxes and out of your bounce statistics.

Codes in the same family

CodeMeaningType
455Server unable to accommodate parametersTemporary
500Syntax error, command unrecognizedPermanent
502Command not implementedPermanent
503Bad sequence of commandsPermanent
504Command parameter not implementedPermanent
452 4.5.3Too many recipientsTemporary
550 5.5.3Too many recipients (permanent)Permanent

A real-world example

A homemade script sends reports by talking to an SMTP server directly. After a server upgrade, every message fails with a protocol error, because the new server is strict about line endings. Replacing the script's raw SMTP code with a standard mail library solves it.

Terms used on this page

Bounce
A message returned to the sender because it couldn't be delivered.
MTA
Mail Transfer Agent, server software that receives and relays email between servers.
Spam
Unsolicited bulk email, usually commercial, sent without the recipient's consent.
Hard bounce
A permanent delivery failure, usually because the address does not exist.
SMTP
Simple Mail Transfer Protocol, the standard protocol servers use to send and relay email across the internet.
STARTTLS
A command that upgrades a plain connection between mail programs to an encrypted TLS connection.

Related guides

Related codes

FAQ

What does SMTP error 501 mean?

The command was recognized, but its arguments were invalid. A malformed email address in MAIL FROM or RCPT TO is the most common cause.

Is 501 a permanent error?

Yes. 501 is a permanent failure, so the sending server will not retry. Fix the cause and send the message again.

How do I fix 501?

If you sent the email: Check the recipient address for typos, spaces and extra characters. If you run the mail server: Make sure your server sends a valid fully qualified hostname in EHLO.

Does 501 mean I am blacklisted?

Usually not. 501 points to a protocol problem, not to your reputation. Blocklist rejections normally use codes in the x.7.x family, often 550 5.7.1 or 554 5.7.1.

Can the recipient fix it?

Rarely. Most causes of this error are on the sending side or in the receiving server's policy, so the sender or the sender's mail admin has to act.

Will I see 501 in Gmail or Outlook?

Yes, if your message fails this way. Gmail shows it in a message from "Mail Delivery Subsystem", and Outlook shows it in a non-delivery report that starts with "Delivery has failed" or "Undeliverable". The code is printed in the technical details near the bottom.

Codes and meanings follow RFC 5321, RFC 3463 and related standards, plus the published error references of major providers. Provider wording changes over time.

Install TempMailify

Add TempMailify to your device for one-tap access, like a regular app.