Glossary · Infrastructure
What is SMTP?
SMTP (Simple Mail Transfer Protocol) is the standard protocol for sending email between mail clients, applications and mail servers.
How SMTP works
An SMTP client connects to a server, introduces itself (EHLO), optionally upgrades to TLS (STARTTLS), authenticates, then sends the envelope (MAIL FROM, RCPT TO) and the message (DATA).
EHLO app.acme.com
STARTTLS
AUTH PLAIN ...
MAIL FROM:<bounces@send.acme.com>
RCPT TO:<ada@example.com>
DATA
Subject: Your login code
...
.
QUIT
SMTP vs an email API
SMTP works with almost any language, CMS or device. An HTTP email API is usually faster to integrate in code, returns a message ID immediately and isn't affected by blocked SMTP ports. Stack Emails supports both: the REST API and the SMTP relay.