502
SMTPERRORCommonClient ErrorHIGH confidence
Command not implemented
What this means
The 502 code means the server recognizes the command as valid but has not implemented it. This occurs when a client tries to use a feature or extension that the server does not support.
Why it happens
- 1The client is trying to use an ESMTP extension the server does not offer.
- 2The client is attempting to use an obsolete or rare command like `SEND`, `SOML`, or `SAML`.
- 3The server has explicitly disabled a command for security or policy reasons.
How to reproduce
A client tries to use the outdated `TURN` command, which is not implemented on modern servers.
trigger — this will error
trigger — this will error
TURN 502 5.5.1 Command not implemented
expected output
502 Command not implemented
Fix
Check server features
WHEN When you control the client software
Check server features
// Parse the response from EHLO to see supported commands
const supported = parseEhloResponse(ehlo_text);
if (!supported.includes('AUTH')) {
// Don't attempt to authenticate
}Why this works
By checking the features advertised by the server in the `EHLO` response, the client can avoid using commands the server doesn't support.
What not to do
✕ Retry the same command
The server is explicitly stating it does not support this command. Retrying is pointless.
Sources
Content generated with AI assistance and reviewed for accuracy. Found an error? hello@errcodes.dev