Email
Research
Email engineering guide

Designing a unified email API without hiding provider truth

A useful unified layer keeps account, message, draft, attachment, and event workflows stable while making provider-only fields and constraints explicit rather than pretending all mailboxes behave alike.

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

Normalize the resources products repeatedly need

Use consistent account, address, thread, message, draft, attachment, and container shapes. Identify every object with a DewEngine ID and retain its provider ID for support, migrations, and native operations.

  • Accounts and identities
  • Threads and messages
  • Folders, labels, and flags
  • Drafts, sends, and replies
  • Normalized change events
02
Provider extensions

Keep differences first-class

Gmail labels can overlap, Graph delta is per folder, and IMAP capabilities vary by server. Put provider extensions and capability discovery beside the common fields rather than dropping data into an undocumented lowest common denominator.

03
Connection

Expose one hosted flow with distinct trust boundaries

The interface can be shared, but Google verification, Microsoft consent, and IMAP/SMTP credential or OAuth setup remain provider-specific. Return a stable account ID and a precise connection state after each flow.

04
Portability

Make leaving and debugging possible

Offer exportable identifiers and data, documented event versions, raw diagnostic codes, and account deletion. A customer should understand which provider feature is unavailable without reverse-engineering the normalization layer.

  • Provider coverage matrix
  • Versioned schema
  • Native field access
  • Data export and deletion
Questions

Before you build.

Will one unified endpoint behave identically for Gmail, Outlook, and IMAP?+

The common contract can be consistent, but provider capabilities, consent, limits, and synchronization semantics still differ. The API should report those differences, not conceal them.

What should happen when a provider lacks a common feature?+

Capability discovery should mark it unsupported before execution, and the API should return a stable unsupported-capability error rather than a false success or silent approximation.

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