email_send

Send an email from a Sodimo sender, with optional attachments.

Category
Email
Stability
Beta
Version
v1
Auth
cf-access

Input schema

{
  "type": "object",
  "properties": {
    "from": { "type": "string", "format": "email", "description": "Must be a configured Sodimo sender." },
    "to": { "type": "array", "items": { "type": "string", "format": "email" }, "minItems": 1 },
    "cc": { "type": "array", "items": { "type": "string", "format": "email" } },
    "subject": { "type": "string" },
    "body": { "type": "string", "description": "Plain text." },
    "body_html": { "type": "string", "description": "Optional HTML alternative." },
    "attachments": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "filename": { "type": "string" },
          "content_base64": { "type": "string" },
          "mime_type": { "type": "string" }
        },
        "required": ["filename", "content_base64", "mime_type"]
      }
    }
  },
  "required": ["from", "to", "subject", "body"]
}

Output schema

{
  "type": "object",
  "properties": {
    "message_id": { "type": "string" },
    "queued_at": { "type": "string", "format": "date-time" }
  }
}

Example invocation

{
  "tool": "email_send",
  "arguments": {
    "from": "rani@sodimo.eu",
    "to": ["j.lefevre@acmebistro.fr"],
    "subject": "Confirmation commande SO-2026-04-1042",
    "body": "Bonjour Jean,\n\nVotre commande est confirmée.\n\nCordialement,\nRani"
  }
}

Example response

{
  "message_id": "msg_01JK3QZ5Z9",
  "queued_at": "2026-04-22T13:02:00Z"
}

Emits a run_ledger row with surface=email_send so every outbound email is auditable. Rate-limited to 60/min per sender. Use email_status to confirm delivery.