# trace_email

> Trace what happened to a customer's mail in the mail-server log: per message the delivery verdict (delivered / bounced / deferred / frozen / queued) with the remote…

- Tier: R
- Required scope: read:email
- Annotations: readOnlyHint, idempotentHint, openWorldHint
- Docs: https://api.inleed.com/tools/trace-email

## Description

Trace what happened to a customer's mail in the mail-server log: per message the delivery verdict (delivered / bounced / deferred / frozen / queued) with the remote host, the SMTP error or defer reason, sender, recipient, subject and timestamps. Accepts an email, a domain, or a service id. It reads the log over SSH on the hosting node, so it may degrade to an empty result with a note; that is not an error, just no data available.

## Input schema

- `input` — string (required). An email address (matched as sender or recipient), a domain (any address on it), or an Inleed service id. Resolved to the owning account; the resolved target is echoed back.
- `days` — integer. How many days of the mail log to search. Defaults to 2; larger values read rotated logs and cost more. Range 1–30.
- `limit` — integer. Maximum messages to return, newest first. Defaults to 25 to protect the response budget. Range 1–200.

## Example call

```json
{
  "name": "trace_email",
  "arguments": {
    "input": "example.se"
  }
}
```

## Example conversation

**User:** Did my email reach customer@example.se?

**Assistant:** Three attempts yesterday: two delivered, one bounced (recipient mailbox full).

