> For the complete documentation index, see [llms.txt](https://docs.datajet-app.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.datajet-app.com/liquid/tags/email.md).

# email

Sends an email with HTML content. The content between the opening and closing tags becomes the email body.

```liquid
{% email to: "customer@example.com", subject: "Order Confirmation" %}
  <h1>Thank you for your order!</h1>
  <p>Your order #{{ order.name }} has been confirmed.</p>
  <p>Total: {{ order.total_price | money }}</p>
{% endemail %}
```

#### Syntax

```liquid
{% email to: "recipient@example.com", subject: "Subject line" %}
  HTML content here...
{% endemail %}
```

#### Parameters

| Parameter     | Required | Description             |
| ------------- | -------- | ----------------------- |
| `to`          | Yes      | Recipient email address |
| `subject`     | No       | Email subject line      |
| `cc`          | No       | CC recipient(s)         |
| `bcc`         | No       | BCC recipient(s)        |
| `replyTo`     | No       | Reply-to email address  |
| `attachments` | No       | File attachments        |

#### Examples

**Basic email:**

```liquid
{% email to: "admin@store.com", subject: "Daily Report" %}
  <h2>Sales Report for {{ "now" | date: "%B %d, %Y" }}</h2>
  <p>Total orders: {{ orders.size }}</p>
{% endemail %}
```

**With CC and Reply-To:**

```liquid
{% email
  to: "customer@example.com",
  cc: "sales@store.com",
  replyTo: "support@store.com",
  subject: "Your Invoice"
%}
  <p>Please find your invoice attached.</p>
{% endemail %}
```

**Dynamic recipient:**

```liquid
{% for customer in customers %}
  {% email to:customer.email, subject:"Special Offer Just for You" %}
    <p>Hi {{ customer.first_name }},</p>
    <p>We have a special offer waiting for you!</p>
  {% endemail %}
{% endfor %}
```

**With attachments:**

```liquid
{% email
  to: "customer@example.com",
  subject: "Your Report",
  attachments: report_files
%}
  <p>Please find your requested reports attached.</p>
{% endemail %}
```

#### Notes

* Emails are sent from DataJet's verified sender address
* Daily email limit applies per store
* Store must be trusted and have email sending enabled
* HTML content is supported in the email body
* Each email sent consumes 1 credit


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.datajet-app.com/liquid/tags/email.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
