email_send

Envoyer un email depuis un expéditeur Sodimo, avec pièces jointes optionnelles.

Catégorie
Email
Stabilité
Bêta
Version
v1
Auth
cf-access

Schéma d’entrée

{
  "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"]
}

Schéma de sortie

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

Exemple d’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"
  }
}

Exemple de réponse

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

Émet une ligne run_ledger avec surface=email_send afin que chaque email sortant soit auditable. Limité à 60/min par expéditeur. Utilisez email_status pour confirmer la livraison.