Reference
?

email.send

Send one email from the app's own verified sender — markdown, HTML, or hosted HTML, with threading, attachments, and a transactional or marketing classification.
email.send({ to, subject, body }) → { recipients, suppressed, batchId }

The high-level way to send one email from the app's own verified sender. body is markdown, HTML, or a CDN URL to hosted HTML, auto-detected unless you pin bodyType, and at least one of to, cc, or bcc must resolve to a recipient. Set category: 'transactional' for receipts, password resets, and sign-in codes so the message carries no unsubscribe header and is never held back by the suppression list; leave it at the default 'marketing' for anything a recipient can opt out of.

The call returns the addresses it accepted (recipients), any it skipped for a prior unsubscribe (suppressed — a normal success state on a marketing send, not an error), and a batchId you can pass to email.batch to watch delivery drain. The underlying send also reports cc, bcc, and the resolved from.

This is the door most sends should use. Reach for the lower-level sendEmail action only when you need connectionId to resolve recipients from an OAuth connection, or generateHtml to have a model style the body — the two things email.send does not carry.

Parameters
subject
string
RequiredThe subject line.
body
string
RequiredThe body: markdown or plain text (auto-detected), raw HTML, or a CDN URL to a hosted HTML file.
to
string | string[]
Recipient address(es). At least one of to, cc, or bcc must resolve to a recipient.
cc
string | string[]
Carbon-copy address(es).
bcc
string | string[]
Blind-copy address(es).
from
string
Sender, valid only when the app owns a custom domain or subdomain — a bare handle, a full address, or "Name <addr>". Auto-selected when omitted.
replyTo
string
Reply-To address.
bodyType
'auto' | 'html' | 'markdown' | 'text'
How to interpret body. Defaults to auto-detection.
autohtmlmarkdowntext
text
string
Explicit plain-text alternative; derived from body when omitted.
inReplyTo
string
The Message-ID being replied to, for threading a shared-inbox reply.
references
string[]
Prior Message-IDs in the thread.
attachments
(string | { url, filename?, contentType? })[]
URLs, or objects carrying a url with an optional filename and contentType.
category
'transactional' | 'marketing'
Transactional carries no unsubscribe header and is never suppressed; marketing (the default) honors the unsubscribe list.
transactionalmarketing
batchId
string
Your own id to group a blast; one is generated and returned when omitted.
Send from a method
import { email } from '@mindstudio-ai/agent';

const { recipients, suppressed, batchId } = await email.send({
  to: 'user@example.com',
  subject: 'Your receipt',
  body: 'Thanks for your order — details inside.',
  category: 'transactional',
});