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

# Emails and preview

> How your agent builds emails, and how you preview and test them before anything goes out.

Your agent writes every email. You check it in the Shopify admin and in your own inbox. Campaigns and flow steps both use the emails saved here.

## How an email is built

* **HTML with Liquid.** The same template language Shopify's own notifications use. An email has a name, a subject, preview text and its HTML.
* **Every save is a new version.** A version never changes, so an approval or a sent message points at exactly what you saw.
* **Archiving keeps every version.** An archived email can't be picked for a new campaign or flow step. Your agent can delete an email only when no campaign, flow or draft uses it.
* **Variables:** `contact.first_name`, `contact.last_name`, `contact.email`, `shop.name`, `shop.url`, `shop.address` and `unsubscribe_url`.
* **Flow emails get more.** An order flow gets `order`, a shipping flow also gets `fulfillments`, an abandoned checkout flow gets `checkout`, and an app event flow gets `event`. Previews and tests fill them with sample data.

```liquid theme={"dark"}
<p>Hi {{ contact.first_name | default: 'there' }},</p>
```

* **Products** come live from your Shopify catalog and are written into the email, so the approved version is exactly what goes out.
* **The unsubscribe link and your shop address** appear in every email. A design can place them, never leave them out. Links are rewritten to count clicks, and an open pixel is added while tracking is on and the contact hasn't declined it.
* **From Klaviyo:** after a migration, your agent can turn a Klaviyo design into an email. Expect some manual fixes. Klaviyo-only tags are flagged as errors until your agent rewrites them in Liquid.

### Images live in Shopify Files

When your agent saves an email, OpenEmails copies each of its images into your store's **Content > Files**. Sent emails load them from Shopify's CDN.

* Use PNG, JPEG, WebP or GIF (animated too). Gmail and Outlook don't show SVG, so an SVG or any other format blocks approval.
* Have an image only as a file? Upload it in **Content > Files** and give your agent its link.
* A campaign or flow can't be approved until every image is copied. If someone deletes a copy in Files, approval is blocked until the email is saved again.
* The copies count toward your Shopify file storage. OpenEmails never deletes them.
* Flow emails can show the product, cart, checkout or order images of the contact they go to. Those load from Shopify and are not copied.

### Errors and warnings

* **An error** blocks approval until your agent saves a fixed version, for example an unknown variable or an unsupported image. Test emails still go.
* **A warning** is worth a look but doesn't stop the email. Examples: HTML over 90 KB, a `<style>` block over 16 KB (Gmail drops it), or an image without alt text.

### Composed images

Your agent can make a hero image from your exact words, your brand colors and one of your product photos. The image is saved in **Content > Files**.

* **Three layouts:** words beside the photo, words above the photo, or words above a full-width photo.
* **Your words stay readable.** The email repeats every word in the image as live text. Prices, codes, dates and buttons stay in the HTML, never in the image.
* **You confirm it.** Your agent quotes the words and names the photo, and you confirm they match before it saves the email.
* **The preview shows how it was made:** the image's words, source photo, layout, font and colors. Approval pages show the same.

## Templates and shared blocks

Your agent can save a layout as a template and build emails from it. It can also save shared blocks, such as a header or footer, that templates and emails hold.

* **Where they are:** open **Emails**, then the **Templates** or **Shared blocks** tab. Each row shows the name, how many emails use it and when it was saved.
* **A template's page** shows its newest version with sample data, at **Desktop** or **Mobile** width, and the emails made from it under **Used by**.
* **Changing a template changes no email.** Every save is a new version. Emails keep the version they were saved with. A change reaches only the emails your agent builds afterwards.
* **Changing a shared block is a rollout.** Your agent saves new versions of the emails that hold the block. One approval shows the block before and after, every live marketing flow and scheduled campaign it touches, and their previews.
* **Transactional flows** still need their own approval after a rollout.
* The tabs are read-only. To create, change or archive a template or block, ask your agent.

```text Ask your agent wrap theme={"dark"}
Save our newsletter layout as a template, with the header and footer as shared blocks. Then build next week's email from it.
```

## Your brand

Your agent uses your brand so every email it writes matches your store. Open **Settings > Brand** to see it: logos, colors, fonts, voice, proof points, brand images, social links and footer. The page is read-only.

Each value comes from the first of three places that has it. A line under the value says which one:

* **Saved for email:** your agent saved it for email. It wins over your store's value.
* **From Shopify brand settings:** your logo, colors, slogan and short description from your Shopify brand assets.
* **From your theme:** colors, fonts, logo and button corners from your published theme.

Proof points are claims about your store that your agent may quote word for word, such as where your products come from. Your agent shows you the list before it saves one.

Changing the brand changes only emails written afterwards. Choose **Refresh brand** to see a change you made in Shopify or your theme. To change a value saved for email, ask your agent.

```text Ask your agent wrap theme={"dark"}
Read my brand from my store: logo, colors, fonts, voice and social links. Show me what you would save for email before you save it.
```

The **From name** and open and click tracking live in **Settings > Email settings**. Your agent can change them too.

**1. Have your agent write the email**

* Ask for the email in plain words. Your agent saves it and gives you a preview link.

```text Ask your agent wrap theme={"dark"}
Write an email for our autumn sale, in our brand, featuring our three best sellers. Give me the preview link.
```

> [!TIP]
>
> **Checkpoint:** the link opens the email in the Shopify admin.

**2. Preview it**

* Open the preview link, or **Emails** in the app nav. Choose the **All**, **With problems** or **Archived** view, then select an email to open its newest version.
* The page shows the inbox row (sender name, subject and preview text), then **Problems**, then the email itself.
* Choose **Desktop** or **Mobile** to see it at either width. **Fallback fonts** shows it without web fonts, as Gmail, Outlook and Yahoo Mail do. **Images off** shows the alt text in place of each image.
* **Made from** names the template and shared blocks. **Used in** lists the campaigns and flow steps that use the email.
* **Version** shows when the version was saved. Pick an earlier version there to compare. Without a contact in the link, the email is filled with sample data.
* **Change this email** gives you a prompt to copy. It names this exact version, so your agent starts from what you see.
* Nothing on the page changes or sends the email. The frame runs no scripts. Its unsubscribe link is a sample that can't unsubscribe anyone.

> [!TIP]
>
> **Checkpoint:** **Problems** reads **No problems found**, and the email looks right at both widths.

**3. Add your test addresses**

* Open **Settings > Test addresses**, enter an address and choose **Add test address**. You can have five active.
* Your own verified Shopify address becomes active at once, and the store owner's is added when they first open the app. Any other address asks you to confirm it. That confirmation is your approval.
* An address your agent adds shows **Needs approval** until you approve it. **Remove address** frees a slot.
* A request that expired shows under **Recent expired requests**. Enter the address again and choose **Add test address**, or ask your agent to request it again.

```text Ask your agent wrap theme={"dark"}
Help me add an address for test emails. Ask me which address to use, then share any approval link I need to review in Shopify.
```

> [!TIP]
>
> **Checkpoint:** the address is listed under **Saved test addresses** as **Active**.

![Settings > Test addresses: the add form and three active saved test addresses.](https://mintcdn.com/openemails/_EEXRkFEoy5ouZ3V/images/use/test-addresses.png?fit=max\&auto=format\&n=_EEXRkFEoy5ouZ3V\&q=85\&s=698ec93816f18ae7e7280615599ab74c)

**4. Send a test**

* Test sends go through your agent: to every active test address, or to the ones you name, with sample data or as a chosen contact would see it. The subject goes unchanged.
* Test emails skip the consent check and holds, but never the do-not-email list. At most 200 go out in any 24 hours.
* Their opens and clicks never count in your results, and their unsubscribe link leads to a page that says it's a test.

```text Ask your agent wrap theme={"dark"}
Send a test of the Autumn sale email to my test addresses, personalized as ana@example.com.
```

> [!TIP]
>
> **Checkpoint:** the test is in your inbox, with images loaded and links working.

> [!NOTE]
>
> **Before PostShiba approves your account**, test emails reach only your PostShiba team's own addresses. Any other address comes back as not approved yet. See [Connect your sending domain](https://docs.openemails.com/setup/connect-your-sending-domain.md).

When it looks right, send it: [Campaigns](https://docs.openemails.com/use/campaigns.md) or [Flows](https://docs.openemails.com/use/flows.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.