# send

Canonical URL: https://developers.iagenify.com/sdk/agent/permissions/categories/send/
Language: en

A message leaves for someone else, under the account's own address. Asked every single time, in every mode, with no « always » — because nothing brings it back.

Status: asked in full too · no always · one of three

| ask | auto | plan | full |
| --- | --- | --- | --- |
| asked | asked | refused | asked |

## The tool {#tool}

`send_mail`, and only it. Reading mailboxes is `read`; changing a mailbox's settings is `storage`. Sending is its own thing.

## Why no mode opens it {#why}

> **A sent message is sent**
>
> There is no draft to recall, no version to restore and no checkpoint that reaches a recipient's inbox. And it goes out under the customer's own address, so a mistake is theirs in the eyes of whoever receives it.

Returning `always` is accepted by the callback and treated as `once`. The next send is asked again.

## Review the message, not the tool {#reviewing}

```javascript
onPermission: async ({ category, args }) => {
  if (category !== "send") return "once";

  console.log("To:", args.to);
  console.log("Subject:", args.subject);
  console.log(args.text);

  return await confirmWithTheUser();     // "once" | "deny"
}
```

The recipients, the subject and the body are all in `args`. This is the one category where showing the arguments to a person is the whole point of the prompt.

## With no callback it cannot send at all {#no-approver}

The refusal says so in those terms — « sending needs the user's approval and no one can approve it » — so an unattended run names the limit rather than failing obscurely.

## The body is plain text {#body}

The tool sends text, escaped on the way out. Caller-supplied HTML is not accepted, which removes a whole class of mistake from something that goes out under the customer's name.

- [Always asked](/sdk/agent/permissions/always-ask): The three together.
- [send_mail](/sdk/agent/tools/send-mail): The tool.
- [mailbox.send()](/sdk/ref/mailbox/send): Doing it yourself.

```python
def on_permission(request):
    if request["category"] != "send":
        return "once"
    args = request["args"]
    print("To:", args.get("to"))
    print("Subject:", args.get("subject"))
    print(args.get("body") or args.get("html"))
    return confirm_with_the_user()     # "once" | "deny"
```
