Requested mail action okay, completed
The 250 code is the most common success code, indicating that the server has accepted and completed the requested action. It is sent after commands like `EHLO`, `MAIL FROM`, and `RCPT TO` have been successfully processed.
- 1The `EHLO` command was accepted.
- 2The `MAIL FROM` address was valid and accepted.
- 3The `RCPT TO` address was valid and accepted.
- 4The email data was successfully received after the `DATA` command.
A client specifies a valid recipient, and the server confirms it can accept mail for that address.
RCPT TO:<recipient@example.com> 250 2.1.5 OK
expected output
250 OK
Fix
Verify 250 after each MAIL FROM and RCPT TO before proceeding
WHEN In SMTP client code — every critical command must return 250
MAIL FROM:<sender@example.com> 250 2.1.0 OK RCPT TO:<recipient@example.com> 250 2.1.5 OK DATA 354 ... . 250 2.0.0 OK: queued
Why this works
Each command must be acknowledged with 250 before the next is issued (unless pipelining is negotiated). A non-2xx reply at any step means that step failed.
✕ Assume 250 after DATA means the email was delivered to the recipient
250 means the server accepted and queued the message. Delivery to the final recipient may still fail — the server will send an NDR bounce if it does.
Content generated with AI assistance and reviewed for accuracy. Found an error? hello@errcodes.dev