Skip to content

Email Integration 🟑 BETA

Email support is split between the botemail crate (IMAP/OAuth, threading, triage and routes) and BASIC keywords such as SEND MAIL and ON EMAIL.

Administrator guide map

Overview

The mail Cargo feature pulls in botemail, lettre, mailparse and imap. Message triage and unified-inbox behaviour live in the crate; sending from a script uses the registered keyword.

Module Structure

Module in botemail Responsibility
imap_auth.rs IMAP authentication
oauth.rs OAuth flows for mail providers
unified_inbox.rs Inbox aggregation
threading.rs Conversation threading
email_triage.rs Category classification of messages
routes.rs HTTP surface

BASIC Keywords for Email

Keyword Use
SEND MAIL Send a message from a script; see the keyword page.
ON EMAIL React to an incoming message.
CREATE DRAFT Prepare a draft without sending.

Email Operations

Reading and sending are separated: inbound messages enter through the IMAP/OAuth path and outbound messages go through the mail transport configured for the bot. Triage classifies a message as urgent, meeting request, informational or spam.

Security

Mail credentials belong in Vault, not in committed configuration. Provider-side error details stay in the server log; callers receive a sanitized response.

Use Cases

Pattern Mechanism
Support inbox Unified inbox plus triage category
Notification from a bot SEND MAIL on an event or schedule
Draft review CREATE DRAFT before sending

Integration with Other Features

Email can trigger automation through ON EMAIL, add knowledge through the Sources accounts path, and hand off to a human through the attendant flow.

Limits

  • The mail feature must be compiled; there is no runtime-only mail switch.
  • A provider must have a working OAuth or IMAP credential before its account can be used.
  • Triage is classification, not automated sending.

See Also