Email
Research
Email engineering guide

Email API fundamentals for product engineers

Mailbox products need more than a send endpoint: define account authorization, message and thread resources, provider synchronization, sending, events, security, and recovery as one system.

Research surface only. This guide documents architecture and evaluation criteria; it does not describe a released DewEngine connector.
01
API categories

Identify which kind of email product you are building

Mailbox APIs act inside a user's existing account. Transactional delivery APIs send application mail. Marketing platforms manage campaigns. A product may need several, but their identities, permissions, deliverability, and data models should remain explicit.

02
Provider surface

Cover official APIs before protocol fallback

Use Gmail API for Google accounts and Microsoft Graph for Outlook. Add secure IMAP for other mailbox access and SMTP for submission, while preserving server capability differences and provider-native fields.

  • Gmail messages, threads, labels, and history
  • Graph messages, folders, and delta
  • IMAP mailboxes, UIDs, flags, and capabilities
  • SMTP submission for standards-based sending
03
System design

Build a state machine around every account

Connection, baseline sync, active, degraded, reconnecting, resyncing, and disconnected are normal lifecycle states. Commands and webhooks must be idempotent and every provider cursor must advance transactionally.

04
Release bar

Prove behavior with real provider accounts

A connector is sellable only after send, read, reply, move, delete, attachment, sync, reconnect, quota, and revocation cases pass against the account types promised on the website.

  • Capability matrix
  • Real-account conformance
  • Security and deletion evidence
  • Measured sync and recovery service levels
Questions

Before you build.

Is an email API the same as SMTP?+

No. SMTP submits outgoing mail. A mailbox API can also read, organize, draft, reply, synchronize, and expose account-specific resources and changes.

What is the hardest part of an email integration?+

Usually the long-running lifecycle: consent, synchronization, cursor recovery, provider differences, reconnection, and protecting sensitive mailbox data.

Can I use DewEngine's email connectors today?+

Not yet. Gmail, Microsoft Graph, and IMAP/SMTP connectors are planned. This guide documents the intended architecture and the provider requirements a production release must satisfy.

Build with us

Does this match the workflow your users need?

DewEngine is in development. Real use cases decide what ships first.

Share your use case