Why read this? You don’t need to memorize every RFC to use Relay, but a 5-minute tour of the landscape helps you debug faster — and impress friends at parties.

Standards & Governance

IETF

Internet Engineering Task Force – the community that writes the open specifications powering e-mail, HTTP, TLS, etc. All core mail specs are “RFCs” (Request for Comments) published by the IETF.

RFC

A numbered document that defines a protocol. Example: RFC 5322 specifies e-mail headers. Every server and client that follows the same RFC can inter-operate – that’s why you can fetch Gmail via Apple Mail.

Anatomy of an email

  • Headers: key-value pairs describing sender, recipients, threading
  • Body: one or more “parts” (plain text, HTML, PDF, images)
email example
Headers
  From:       alice@example.com
  To:         bob@example.org
  Subject:    Weekly sync?
  Message-ID: <CA123@example.com>
  In-Reply-To:<B7@example.org>

Body (plain text or HTML + attachments)

Email Protocols

  • (RFC 3501) — read & organize mail.
  • IDLE (RFC 2177) — real-time notifications.
  • (RFC 1939) — download and delete mail.
  • (RFC 5321) — send mail.
  • (RFC 8620) — modern JSON read/send.

From Server to App: Who Does What?

LayerAcronymExample softwareWhat it does
Mail Transfer AgentMTAPostfix, EximRoutes SMTP traffic between domains.
Mail Delivery AgentMDADovecot, CourierSaves incoming mail to the user’s mailbox.
Mail User AgentMUAOutlook, Thunderbird that people click.
Relay-(open-core)Sits between MUA and IMAP, giving dev-friendly JSON + webhooks.

Providers vs. Clients

  • Provider = organization hosting an MTA/MDA (Gmail, Outlook, Proton, your own VPS).
  • Client = anything that logs in to read or send mail (iOS Mail, Superhuman, your script).

Relay treats every provider the same as long as it offers IMAP/SMTP. Your code talks to a single /messages endpoint.

Email APIs vs. Delivery APIs

Both provide programmable access to email-related operations.

CategoryExamplesFocus
Delivery APIsResend, SendGrid, SESHigh-volume outbound (newsletters, receipts).
Interaction APIsRelayRead, search, tag, reply, build full apps.

Use both together: Resend for blasts, Relay for smart follow-ups.

Key Terminology in Relay

TermShort definition
Email accountIMAP/SMTP credential set you connect
MessageA single e-mail, defined by its Message-ID or IMAP UID.
ThreadAll messages sharing References/In-Reply-To headers
LabelUser-defined tag saved server-side; survives new messages.

Ready?

Head back to Quick-start. We can’t wait to see what you’ll build!

Happy hacking — and welcome to programmable e-mail.