Naar de inhoud
Alle hulpmiddelen

copy_email

E-mail · macOS

Effect: schrijven. Status: voorwaardelijk beschikbaar.

‘Voorwaardelijke beschikbaarheid’ betekent dat het hulpmiddel kan afhangen van versie, platform, machtigingen, account of configuratie. Het is niet in elke installatie actief.

macOS

Doel

Kopieert een e-mail naar een andere mailbox van Apple Mail (Mail.app) op de Mac; het origineel blijft waar het is. Om naar een mailbox van een ANDER account te kopiëren, geef je target_account= mee (de naam of het adres van dat account, uit list_email_accounts): de doelmap wordt dan alleen in dat account gezocht, geneste mappen inbegrepen, ook als het account van het bericht zelf een map met dezelfde naam heeft. Een doel dat niet bestaat wordt geweigerd met de mailboxen die zijn gezien.

Vereiste invoer

De namen blijven exact zoals het hulpmiddel ze vereist. De canonieke technische definities in het Engels staan in het uitklapbare schema hieronder.

Machtigingen en bevestiging

Het schema bevat een expliciete bevestigingsparameter. Controleer het voorbeeld en autoriseer de echte bewerking volgens het platformcontract.

Canoniek technisch schema in het Engels — macOS
{
  "properties": {
    "account": {
      "description": "Mail.app account the message lives in (returned alongside the id). Pass it so the message is found in the right account.",
      "type": "string"
    },
    "confirm": {
      "default": "false",
      "description": "Ignored; kept for older clients.",
      "type": "boolean"
    },
    "mailbox": {
      "description": "Folder the message is in. Passing it skips searching the other folders.",
      "type": "string"
    },
    "message_id": {
      "description": "The message id returned by list_emails or search_emails, copied exactly. Never build one from the subject, sender or date. Accepts the bare id or the <angle-bracketed> form.",
      "type": "string"
    },
    "target_account": {
      "description": "Account to copy the message INTO (its name or address, from list_email_accounts). Omit it to copy within the message's own account.",
      "type": "string"
    },
    "target_mailbox": {
      "description": "Destination folder, by name (see list_email_folders). Nested folders are found by their own name, not by a path.",
      "type": "string"
    }
  },
  "required": [
    "message_id",
    "target_mailbox"
  ],
  "type": "object"
}

Documentatievoorbeeld

Documentatievoorbeeld voor copy_email. Voer dit voorbeeld niet uit. De getoonde argumenten verwijzen naar fictieve gegevens; zoek vóór een echte aanroep de werkelijke identificatoren op en vraag toestemming.

{
  "account": "Demo iCloud",
  "confirm": false,
  "mailbox": "INBOX",
  "message_id": "demo-message-001",
  "target_mailbox": "Projects"
}