> ## Documentation Index
> Fetch the complete documentation index at: https://docs.automate.ax/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Automate.ax automations are TypeScript programs.
> Use Bun for installation and command examples.
> Use Automate.ax for the product name and automate.ax for the package, CLI, and domain.
> Treat documented public APIs as current; do not invent transitional or deprecated names.

# Send email

> Send or schedule a rich transactional email through Brevo.

`sendEmail` sends inline content or an active Brevo template. Use message
versions when recipients need different content, parameters, or templates in a
single provider request.

## Example

```ts theme={null}
import { automation, onHttpRequest } from "automate.ax"
import { sendEmail } from "automate.ax/brevo"

export default automation("Send a welcome email", () => {
  onHttpRequest({ scope: "automation" })

  sendEmail({
    sender: { email: "hello@example.com", name: "Example" },
    to: [{ email: "ada@example.com", name: "Ada" }],
    subject: "Welcome",
    htmlContent: "<p>Welcome to Example.</p>",
    textContent: "Welcome to Example.",
    replyTo: { email: "support@example.com" },
    tags: ["welcome"],
  })
})
```

## Inputs

For inline email, `sender`, `subject`, at least one of `htmlContent` or
`textContent`, and `to` are required. A sender is `{ email, name? }` or `{ id,
name? }` and must be registered in Brevo. With `templateId`, the template can
supply sender, subject, and content. `to`, `cc`, and `bcc` contain `{ email,
name? }`; `to` is required unless `messageVersions` is present.

Optional fields include `params: Record<string, JSONValue>`, `replyTo`, custom
string/number `headers`, `tags`, RFC 3339 `scheduledAt`, UUID `batchId`, and
attachments. An attachment is `{ content: string; name: string }` with base64
content or `{ url: string; name?: string }` with a public URL.

Each message version requires 1–99 `to` recipients and can override `bcc`, `cc`,
`htmlContent`, `textContent`, `params`, `replyTo`, `subject`, and `templateId`.
All versions together support at most 2,000 recipients. `account` selects the
Brevo binding.

## Output

Returns `{ messageId: string }` for a normal send or `{ messageIds: string[] }`
for a multi-version send. Use those IDs with [Get email content](/reference/integrations/brevo/actions/get-email-content) or event filters.

Brevo charges transactional email usage per recipient under the connected
account's plan, including version recipients. Scheduling does not bypass plan
limits. A successful response means Brevo accepted the request, not that the
recipient mail server delivered it; use the delivery triggers for that outcome.
