3.834 / 5.000
SMTP stands for Simple Mail Transfer Protocol. It is the open internet protocol used to send email messages from one mail server to another. When you send an email from your email program or website, SMTP ensures that the message is routed to the recipient's mail server via a network of Mail Transfer Agents (MTAs).
How does SMTP work in a broad sense?
As soon as you click "Send," your email client establishes a TCP connection with the specified SMTP server. This is followed by a handshake using a series of SMTP commands such as EHLO, MAIL FROM, RCPT TO, and DATA. The mail server checks whether you are authorized to send (authentication and SPF/DMARC checks), accepts the email (or rejects it with an error message), and delivers the message to the next server or directly to the recipient's mailbox.
SMTP traffic uses the following ports:
Port | Encryption | Typical usage |
---|---|---|
25 | STARTTLS or none | Server-to-server traffic (relay) |
465 | SSL/TLS | Legacy encrypted client connection |
587 | STARTLS | Modern, authenticated client connection |
What do you need SMTP for?
- Send email from a mail client (e.g., Outlook or Apple Mail).
- Email from a VPS or website application (e.g., contact form or webshop notifications).
- Forwarding messages between mail servers (relaying).
Common SMTP errors
In case of incorrect settings or a block, the server may return error codes:
- 550 5.7.1 – A configuration error, for example, as a result of an incorrect SPF record.
- 421 Service not available – The server is temporarily unavailable or blocked.
- 553 Sender address rejected – The sender domain failed an SPF or DMARC check, usually due to a misconfiguration of the SPF record.