> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dodopayments.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Customer Email Logs

> See every transactional email Dodo Payments sent to a customer, check whether it arrived, read the email exactly as it was sent, and send it again.

<CardGroup cols={2}>
  <Card title="List Customer Emails" icon="list" href="/api-reference/customers/list-customer-emails">
    Read a customer's sent emails and their delivery outcome.
  </Card>

  <Card title="Get Email Content" icon="envelope-open" href="/api-reference/customers/get-customer-email-body">
    Read one email exactly as it was sent.
  </Card>
</CardGroup>

## Overview

Dodo Payments sends transactional email to your customers on your behalf: receipts, refund notices, subscription notices, dunning and recovery emails, entitlement grants, and Customer Portal login links.

The **Sent Emails** tab on a customer records each one. For every email you see what was sent, where it got to, and why it did not arrive when it failed. You can open the email your customer received, and you can send it again.

<Frame>
  <img src="https://mintcdn.com/dodopayments/9G2eOufWVa-OvQvG/images/email-logs/sent-emails-tab.png?fit=max&auto=format&n=9G2eOufWVa-OvQvG&q=85&s=6c7fa235800cee5c32eb286312f2a52b" alt="The Sent Emails tab on a customer, listing each email with its delivery status" style={{ maxHeight: '500px', width: 'auto' }} width="2310" height="996" data-path="images/email-logs/sent-emails-tab.png" />
</Frame>

<Info>
  Emails are kept for **180 days**. Delivery status comes from the email provider and updates within seconds of the event.
</Info>

## Viewing a Customer's Emails

<Steps>
  <Step title="Open the customer">
    Go to **Customers** in the dashboard and select the customer.
  </Step>

  <Step title="Open the Sent Emails tab">
    The tab lists every email sent to this customer in the last 180 days, newest first.
  </Step>

  <Step title="Read a row">
    Each row shows the subject, the sender below it, the category, the date and time, and the delivery status.
  </Step>
</Steps>

## Delivery Status

| Status       | Meaning                                                                  |
| ------------ | ------------------------------------------------------------------------ |
| `sent`       | Dodo Payments handed the email to the provider. It is on its way.        |
| `delivered`  | The receiving mail server accepted the email.                            |
| `failed`     | The email did not arrive. A failure reason is shown.                     |
| `complained` | The recipient marked the email as spam.                                  |
| `blocked`    | Nothing was sent. In test mode this means the weekly allowance is spent. |

### Failure Reasons

When an email fails, the row carries a reason so you know whether to act. Point at the **Failed** status to read it:

| Reason                                 | What it means                                                                   | What to do                            |
| -------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------- |
| Mailbox does not exist                 | The address does not exist.                                                     | Correct the customer's email address. |
| Address rejected by the mail server    | The receiving server refused the address.                                       | Use a different address.              |
| Address blocked after earlier failures | The provider suppressed this address after an earlier hard bounce or complaint. | Use a different address.              |
| Mailbox is full                        | The recipient's mailbox is out of space.                                        | Send again later.                     |
| Temporary delivery failure             | A transient problem at the receiving server.                                    | Send again later.                     |
| Message rejected as too large          | The receiving server refused the size.                                          | Contact support.                      |
| Recipient marked the email as spam     | The recipient reported the email.                                               | Do not send it again.                 |
| Email could not be sent                | The provider refused the send.                                                  | Send again.                           |

Five of these reasons need a different address on a resend, because the same one would fail again. They are: mailbox does not exist, address rejected, address blocked after earlier failures, message rejected as too large, and recipient marked the email as spam.

## Reading an Email

Select **Resend** on a row to open the email panel. **Email Preview** in that panel shows the stored copy exactly as it was sent.

<Frame>
  <img src="https://mintcdn.com/dodopayments/9G2eOufWVa-OvQvG/images/email-logs/email-preview.png?fit=max&auto=format&n=9G2eOufWVa-OvQvG&q=85&s=b0d00b4b6fe62c6ace0b8a2b4419619b" alt="The stored email content, shown as the customer received it" style={{ maxHeight: '500px', width: 'auto' }} width="824" height="1148" data-path="images/email-logs/email-preview.png" />
</Frame>

Some emails have no content to show:

* **Customer Portal login emails.** They carry a live login link, so the content is never displayed.
* **Blocked emails.** They never reached the provider, so no copy exists.
* **Emails older than 180 days.** The provider clears the content at that point.

## Sending an Email Again

Select **Resend** on a row to send the same email again. Dodo Payments re-renders it from the original event, so a receipt always shows the current state of the payment.

<Frame>
  <img src="https://mintcdn.com/dodopayments/9G2eOufWVa-OvQvG/images/email-logs/resend-email.png?fit=max&auto=format&n=9G2eOufWVa-OvQvG&q=85&s=8751c05df35b14f116c8d487eaae7b70" alt="The resend control on an email row, with the option to send to a different address" style={{ maxHeight: '500px', width: 'auto' }} width="896" height="2104" data-path="images/email-logs/resend-email.png" />
</Frame>

The panel keeps the original address in the **To** field. Change it to send elsewhere. After a permanent failure a different address is required, because the same one would fail again.

<Warning>
  A resend is a new email. It appears as its own row in the tab.
</Warning>

### Limits

* Each email may be sent again **three times**.
* A wait applies between attempts: five minutes before the first resend, ten before the second, fifteen before the third.
* A send that never reached the provider does not count against the three. It still adds to the wait.
* Resend is available in the dashboard only. The API is read-only.

### When Resend Is Not Available

| Case                                            | Reason                                                             |
| ----------------------------------------------- | ------------------------------------------------------------------ |
| The recipient marked the email as spam          | Sending again would breach their complaint.                        |
| The address is suppressed                       | The provider accepts the send and then drops it.                   |
| A later send of the same email already went out | This row is history. Sending it again would deliver a second copy. |
| The customer is blocked                         | A blocked customer receives no further email from you.             |
| The three resends are used                      | The limit is per email.                                            |

<Note>
  A Customer Portal login email always goes to the address that asked for it, and each resend mints a fresh login link.
</Note>

## Test Mode

Test mode sends real email, so it carries an allowance: **100 emails per business per week**. Resends draw from the same allowance.

When the allowance is spent, further emails are recorded as `blocked` and nothing is sent. The row reads "Not sent: the test-mode email allowance for this week is spent". The allowance resets each week. Live mode has no such limit.

<Info>
  Customer Portal login emails never send in test mode, and they do not spend the allowance.
</Info>

## Reading Emails Through the API

The list and the content are also available over your API key, so you can show delivery state in your own support tools.

<CodeGroup>
  ```bash cURL theme={null}
  curl https://live.dodopayments.com/customers/{customer_id}/emails?page_size=10 \
    -H "Authorization: Bearer $DODO_API_KEY"
  ```

  ```typescript Node.js theme={null}
  const res = await fetch(
    `https://live.dodopayments.com/customers/${customerId}/emails?page_size=10`,
    { headers: { Authorization: `Bearer ${process.env.DODO_API_KEY}` } },
  );
  const { items, total_count } = await res.json();
  ```

  ```python Python theme={null}
  import os, requests

  res = requests.get(
      f"https://live.dodopayments.com/customers/{customer_id}/emails",
      params={"page_size": 10},
      headers={"Authorization": f"Bearer {os.environ['DODO_API_KEY']}"},
  )
  items = res.json()["items"]
  ```
</CodeGroup>

Each item carries `status`, the `failure_code` and `failure_reason` when the send failed, and `has_preview` to say whether stored content exists. It also carries a `policies` object that states what you may do with the row:

| Field                        | Meaning                                                            |
| ---------------------------- | ------------------------------------------------------------------ |
| `resend_allowed`             | You may send this row again.                                       |
| `retry_allowed`              | The send failed, and you may attempt it again.                     |
| `resends_remaining`          | How many resends the email has left.                               |
| `requires_different_address` | The same address would fail again, so you must supply another one. |
| `superseded`                 | A later send of the same email replaced this row.                  |

Read `policies` rather than deriving eligibility yourself. The server applies the rules above.

<CardGroup cols={2}>
  <Card title="Customer Management" icon="user-group" href="/features/customers">
    Manage customers, purchase history, and self-service access.
  </Card>

  <Card title="Communication Preferences" icon="bell" href="/features/communication-preferences">
    Choose which emails Dodo Payments sends on your behalf.
  </Card>
</CardGroup>
