Email
Research
Email engineering guide

How to choose an email API for your software

Start with the mailbox behavior your users need, then choose Gmail, Microsoft Graph, IMAP/SMTP, or a unified layer without confusing mailbox sync with transactional delivery.

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

Separate mailbox access from outbound delivery

A mailbox integration reads and changes a user's existing mailbox. A transactional email provider sends product notifications from infrastructure you control. They have different identity, consent, synchronization, and deliverability requirements.

  • User-owned inbox and sent-mail sync
  • Replies and drafts in the user's mailbox
  • Product notifications and bulk delivery as a separate service
02
Provider fit

Prefer official APIs, then cover the protocol long tail

Use Gmail API for Google mailboxes and Microsoft Graph for Outlook and Microsoft 365. IMAP handles mailbox access for other providers, while SMTP submission handles sending; IMAP itself does not send mail.

  • Google OAuth and Gmail resources
  • Microsoft identity and Graph resources
  • TLS-protected IMAP plus SMTP where APIs are unavailable
03
Access model

Budget for consent before writing integration code

Decide whether each action needs delegated user access or an administrative application permission. Request the least privilege possible and plan for Google verification or Microsoft administrator consent when the selected permissions require it.

04
Production proof

Evaluate the lifecycle, not the happy-path endpoint

A sellable integration must survive pagination, expired cursors, token revocation, duplicate notifications, deleted messages, and provider throttling. Test those states with real accounts before calling the connector complete.

  • Initial and incremental synchronization
  • Reconnect and full-resync paths
  • Idempotent sends and notification handling
Questions

Before you build.

Should every product use a unified email API?+

No. A single-provider product may be simpler with that provider's official SDK. A unified layer earns its cost when several providers must share one account, message, event, and error model.

Can IMAP replace Gmail API or Microsoft Graph completely?+

No. IMAP covers mailbox access, but sending requires SMTP and provider APIs expose capabilities, identities, change streams, and administrative controls that IMAP cannot standardize.

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