What is SMTP?

SMTP (Simple Mail Transfer Protocol) is the standard protocol used to send email and relay it between mail servers across the internet.

SMTP, the Simple Mail Transfer Protocol, is the internet standard for sending email. It governs how a mail client hands a message to a server and how servers relay messages to one another until they reach the recipient's mail system. Every email you send passes through at least one SMTP conversation.

An SMTP session is a text-based exchange of commands and numeric response codes. The client greets the server with EHLO, declares the envelope sender with MAIL FROM, names each recipient with RCPT TO, and transfers the message with DATA. The server replies with codes: 2xx for success, 4xx for temporary failures, and 5xx for permanent ones.

SMTP handles sending and relaying only - it does not retrieve mail from a mailbox, which is the job of IMAP or POP3. Modern SMTP runs over encrypted connections, typically on port 587 with STARTTLS for client submission or port 465 for implicit TLS, while server-to-server relay traditionally uses port 25.

Understanding SMTP response codes is practically useful because they explain exactly why a message succeeded or failed. A 550 tells you an address is permanently invalid (a hard bounce), while a 421 or 452 signals a temporary problem (a soft bounce). Email verification tools use a partial SMTP handshake to probe mailbox existence without delivering a message.

Examples

  • MAIL FROM:<sender@example.com> - declares the envelope sender
  • RCPT TO:<recipient@example.org> - names a recipient; 550 means it does not exist
  • 250 2.0.0 OK: message accepted - a successful delivery response

Common questions

What port should I use for sending email?
For client submission, use port 587 with STARTTLS, or port 465 for implicit TLS. Port 25 is reserved for server-to-server relay and is often blocked for client sending to reduce spam.
Does SMTP receive email too?
No. SMTP only sends and relays messages. Retrieving mail from a mailbox to read it is handled by IMAP or POP3, which are separate protocols.
What do SMTP response codes mean?
They report the outcome of each command: 2xx means success, 4xx means a temporary failure worth retrying (a soft bounce), and 5xx means a permanent failure (a hard bounce). The codes pinpoint why delivery succeeded or failed.

Related tools

Related terms for SMTP