# Read the email you sent your customers

> See every email your organization sent its customers, whether it left, and read each one as the customer got it.

Source: https://www.coritan.com/docs/organizations/sent-email/

In the dashboard:

- /dashboard/organizations/…/emails: https://www.coritan.com/dashboard/organizations

**Sent email** lists every email your organization sent its customers, newest first: invoices and receipts, account and password emails, service notices, and your store's order and marketing emails. Open one to read it as the customer got it, in your brand's email layout. Use it to answer "did you email me?" or to check what a template said on the day it went out.

## Before you begin

You need the `support_tier3` role or above (`billing`, `admin` or `owner`), because each email holds a customer's details. For other roles the page is not in the menu, and its address takes them to the overview.

## Read the list

1. Go to [Organizations](https://www.coritan.com/dashboard/organizations), open your organization, choose **Customers**, then **Sent email**.
2. Read the table. Each row shows who it went **To**, with the email's name under the address, its **Subject**, its **Status** and **When** it was sent.
3. To narrow the list, search the recipient's address or the subject, or choose **Sent** or **Failed** in place of **Any status**. The search, the status and the page stay in the address, so a reload or a shared link shows the same list.
4. Use the pages at the bottom to go back to older email. The table shows 50 to a page.

A **Failed** email did not leave: the mail server refused it, the address cannot take mail, or its template did not render. A test you sent yourself from a template's editor shows as `Test:` followed by the email's name.

## Read one email

1. Select a row. The email opens in a panel beside the list, and its number goes in the address, so the browser's back button closes it.
2. Read the facts at the top: **Status**, **To**, **Customer** (select **Open the customer** to go to their page), **Template**, **Wording** (`Your version` when you edited the template, `Coritan's default` otherwise) and when it was **Sent**.
3. Read the email under **As sent**, in your brand's layout. Choose **Plain text** for the version a mail app without HTML shows, and **Copy the text** to copy it.
4. Press Escape or select the close button to go back to the list.

The panel shows the email in a frame that runs no scripts.

## What a kept email leaves out

Coritan keeps a copy of each email so you can read it later, but not the parts that would let someone else use it:

- A password link or an address confirmation link keeps its address without its token, so it opens the right page but cannot sign anyone in.
- A gift card's code keeps only its last four characters.

The panel says so above the email when it left one of these out. The customer got the working version.

## Result

You can see what each customer was sent, when, and whether it left, and read it as they did.

## Troubleshooting

**No copy of this email**
: The email went out before Coritan kept a copy of each one, or its template did not render. The row still says when it was sent and to whom.

**Sent email** is not in your menu
: It needs Tier 3 support or above. Ask an owner or admin to change your role in [Members](/docs/organizations/members-and-roles/).

An email you expected is not listed
: A filter may be leaving it out. Choose **Reset filters**. Replies your team writes to a ticket from the staff console are part of the ticket, not this list.

## Related

- [Manage customers](/docs/organizations/customers/)
- [Change organization settings](/docs/organizations/settings/), where **Email sending** sets the account and the transport your email leaves through.
- [Edit your store's emails](/docs/organizations/commerce/emails/)
- [Roles and permissions](/docs/organizations/roles-and-permissions/)

## With the API

Both routes take an access token of a member with Tier 3 support or above, sent as `Authorization: Bearer $CORITAN_TOKEN`.

```bash
curl "https://api.coritan.com/api/v1/orgs/acme/email-log?status=failed&q=example.com" \
  -H "Authorization: Bearer $CORITAN_TOKEN"
```

| Parameter | What it matches |
| --- | --- |
| `q` | Up to 200 characters of the recipient's address or the subject. |
| `status` | `sent` or `failed`. Any other word answers `422`. |
| `template` | One template, such as `invoice_created`. |
| `limit` and `offset` | `limit` takes 1–200 and defaults to 50; `offset` skips that many of the newest matching emails. |

The answer is `{items, total, limit, offset}`, newest first, and `total` counts every matching email. Each item has `id`, `recipient_email`, `subject`, `template_slug`, `status`, `error`, `org_customer_id` (the customer, or `null`), `source` (`org` for your version of the template, `default` for Coritan's), `has_body` (whether a copy was kept), `sent_at` and `created_at`.

`GET /api/v1/orgs/{org_slug}/email-log/{log_id}` answers one email with the same fields and:

| Field | Meaning |
| --- | --- |
| `html_body` | The email in your brand's layout, as it left. `null` when no copy was kept. |
| `text_body` | Its plain text. `null` when no copy was kept. |
| `withheld` | What the copy leaves out: `reset_url` or `verification_url` (a link kept without its token) and `code` (a gift card's code kept as its last four characters). |

Another organization's email answers `404`.

## API

- `GET /api/v1/orgs/{org_slug}/email-log`: List email log (https://www.coritan.com/docs/api/reference/organizations/org-email-log/#op-get-api-v1-orgs-org-slug-email-log)
- `GET /api/v1/orgs/{org_slug}/email-log/{log_id}`: Get email log (https://www.coritan.com/docs/api/reference/organizations/org-email-log/#op-get-api-v1-orgs-org-slug-email-log-log-id)
