Email
Research
Email engineering guide

Designing an email reply API users can trust

A reply endpoint must preserve conversation context, sender identity, and human intent while separating provider acceptance from actual delivery or recipient engagement.

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

Reply to a message, not merely an address

Accept the parent message or thread identifier and let the connector derive provider context. For standards-based mail, preserve Message-ID relationships through In-Reply-To and References headers rather than reconstructing a thread from subject text alone.

02
Identity

Send only from an identity the mailbox permits

The authenticated account, configured aliases, and provider policy determine the valid From value. Reject arbitrary sender substitution and show the actual sender and recipients before a user confirms a sensitive reply.

  • To, Cc, and Bcc validation
  • Reply versus reply-all choice
  • Authorized alias selection
  • Attachment size and type checks
03
Safety

Make automated replies reviewable

Draft-first workflows are safer for generated text. Store the business decision, approval actor, final content hash, and idempotency key so a retry cannot create a second reply.

04
Result

Report exactly what the provider acknowledged

A successful API response means the provider accepted or created the message. It does not prove final delivery, an open, or a human reply. Return the provider message ID and later state changes only when supported evidence arrives.

  • Accepted provider message ID
  • Normalized error plus raw diagnostic code
  • No fabricated delivery or engagement event
Questions

Before you build.

How do I keep a reply in the existing thread?+

Use the provider's thread or reply operation when available. For standards-based mail, construct the reply with the parent's Message-ID in In-Reply-To and extend the References chain.

Does sending a reply prove that it reached the recipient?+

No. It proves only the state the provider reports at submission time. Delivery, bounce, open, and reply evidence are separate and not uniformly available from mailbox APIs.

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