Protocols
SMTP is from 1982. Why more apps now send email over HTTPS
A protocol built for relays between trusted servers is a poor fit for a web app that needs a message sent in one request.
SMTP was published in 1982 as a way for servers to pass mail to each other. It still runs the internet's mail, but most apps no longer talk it directly.
Why SMTP is awkward for apps
- A conversation with many steps: greeting, sender, recipient, data, each with its own reply code.
- Long-lived connections and retries that the app has to manage.
- Credentials, TLS and port choices that differ between providers.
- Port 25 is blocked on many hosts, so the app can't reach a server at all.
Why an HTTPS API is easier
- One request with JSON: to, from, subject, body. One response with an ID.
- Works from any language with a standard HTTP client, and from serverless code.
- The sending provider keeps the reputation, retries and queues.
What you give up
- Your mail goes through a third party, so you trust their logs and their uptime.
- You need to check that the API tells you when a message was refused, not just accepted.