What SMTP 502 means
RFC 5321 defines 502 as 'Command not implemented'. The server knows the command but doesn't offer it on this connection.
For senders this usually means the client and server disagree about features: trying to log in (AUTH) on a port or server that doesn't accept authentication, or asking for STARTTLS where it isn't offered. Connecting to a provider's incoming MX server instead of its submission server is a classic cause.
What to do about a 502
- Use the provider's submission host and port (for example smtp.gmail.com or smtp.office365.com on 587 with STARTTLS, or 465 with implicit TLS), not the MX host on port 25.
- Check the server's EHLO response in the log: it lists the commands and extensions the server supports. If AUTH or STARTTLS isn't in that list, the client can't use it on this connection.
- Don't suppress the recipient. It's a configuration problem, and nothing was sent.
Reading the rest of the bounce
A bounce usually carries three things: the basic code (502), an enhanced status code such as 5.7.1 (class, subject and detail), and a line of text from the server. The enhanced code and the text are more specific than the basic code, so always read them before deciding whether to suppress a contact. Paste the full bounce into the SMTP error code lookup to decode all three at once.