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

# Get Email

> Retrieve details of a specific email

Get detailed information about a specific sent email by its ID.

## Path Parameters

<ParamField path="id" type="string" required>
  The unique email ID (e.g., `msg_abc123`).
</ParamField>

## Examples

<CodeGroup>
  ```typescript JavaScript theme={null}
  import { MailBreeze } from "mailbreeze";

  const mailbreeze = new MailBreeze({ apiKey: "sk_live_xxx" });

  const email = await mailbreeze.emails.get("msg_abc123");

  console.log(email.status);      // "delivered"
  console.log(email.subject);     // "Welcome!"
  console.log(email.deliveredAt); // "2024-01-15T10:30:05Z"
  ```

  ```python Python theme={null}
  from mailbreeze import MailBreeze

  client = MailBreeze(api_key="sk_live_xxx")

  email = await client.emails.get("msg_abc123")

  print(email.status)       # "delivered"
  print(email.subject)      # "Welcome!"
  print(email.delivered_at) # "2024-01-15T10:30:05Z"
  ```

  ```go Go theme={null}
  client := mailbreeze.NewClient("sk_live_xxx")

  email, err := client.Emails.Get(ctx, "msg_abc123")
  if err != nil {
      log.Fatal(err)
  }

  fmt.Println(email.Status)      // "delivered"
  fmt.Println(email.Subject)     // "Welcome!"
  fmt.Println(email.DeliveredAt) // "2024-01-15T10:30:05Z"
  ```

  ```php PHP theme={null}
  $mailbreeze = new MailBreeze('sk_live_xxx');

  $result = $mailbreeze->emails->get('msg_abc123');

  echo $result['email']['status'];       // "delivered"
  echo $result['email']['subject'];      // "Welcome!"
  echo $result['email']['deliveredAt'];  // "2024-01-15T10:30:05Z"
  ```

  ```rust Rust theme={null}
  let client = Client::new("sk_live_xxx");

  let email = client.emails().get("msg_abc123").await?;

  println!("{}", email.status);       // "delivered"
  println!("{}", email.subject);      // "Welcome!"
  println!("{:?}", email.delivered_at); // Some("2024-01-15T10:30:05Z")
  ```

  ```bash cURL theme={null}
  curl "https://api.mailbreeze.com/api/v1/emails/msg_abc123" \
    -H "Authorization: Bearer sk_live_xxx"
  ```
</CodeGroup>

## Response

<ResponseField name="id" type="string">
  Unique email ID.
</ResponseField>

<ResponseField name="from" type="string">
  Sender email address.
</ResponseField>

<ResponseField name="to" type="string[]">
  Recipient email addresses.
</ResponseField>

<ResponseField name="cc" type="string[]">
  CC recipients.
</ResponseField>

<ResponseField name="bcc" type="string[]">
  BCC recipients.
</ResponseField>

<ResponseField name="subject" type="string">
  Email subject line.
</ResponseField>

<ResponseField name="status" type="string">
  Current status: `queued`, `sent`, `delivered`, `bounced`, or `failed`.
</ResponseField>

<ResponseField name="messageId" type="string">
  SMTP message ID.
</ResponseField>

<ResponseField name="templateId" type="string">
  Template ID if sent with a template.
</ResponseField>

<ResponseField name="createdAt" type="string">
  ISO 8601 timestamp when created.
</ResponseField>

<ResponseField name="sentAt" type="string">
  ISO 8601 timestamp when sent.
</ResponseField>

<ResponseField name="deliveredAt" type="string">
  ISO 8601 timestamp when delivered.
</ResponseField>

<ResponseField name="openedAt" type="string">
  ISO 8601 timestamp when first opened (if tracking enabled).
</ResponseField>

<ResponseField name="clickedAt" type="string">
  ISO 8601 timestamp when first clicked (if tracking enabled).
</ResponseField>

```json Example Response theme={null}
{
  "success": true,
  "data": {
    "email": {
      "id": "msg_abc123",
      "from": "hello@yourdomain.com",
      "to": ["user@example.com"],
      "subject": "Welcome!",
      "status": "delivered",
      "messageId": "abc123@mailbreeze.com",
      "templateId": "welcome-template",
      "createdAt": "2024-01-15T10:30:00Z",
      "sentAt": "2024-01-15T10:30:01Z",
      "deliveredAt": "2024-01-15T10:30:05Z",
      "openedAt": "2024-01-15T11:45:00Z",
      "clickedAt": null
    }
  },
  "meta": {
    "timestamp": "2024-01-15T10:30:00.000Z",
    "requestId": "req_abc123",
    "path": "/api/v1/emails/msg_abc123"
  }
}
```

## Errors

| Code        | HTTP Status | Description                      |
| ----------- | ----------- | -------------------------------- |
| `NOT_FOUND` | 404         | Email with this ID doesn't exist |
