# Introduction to Creating Emails

This article helps you understand how to create emails in Customer.io at a high level.

 Check out Design Studio!

[Design Studio](/journeys/design-studio-overview/) is our newest, most flexible email editor. Use components to create a block-based email from scratch, and set global styles to create a consistent brand across your messages made in Design Studio. No longer do you have to decide between a visual or code-based editor; you can use both!

## Writing your message[](#writing-your-message)

You can use one of [four editors](/journeys/email-editors/) to create your email copy: [Design Studio](/journeys/design-studio-overview/), drag-and-drop, rich text, or code.

To create reusable content and structure:

*   With Design Studio, use [components](/journeys/components-overview/).
*   With the drag-and-drop editor, use [snippets](/journeys/snippets/) and [saved rows](/journeys/drag-and-drop/#save-rows).
*   For the rich text and code editors, use snippets and [layouts](/journeys/3-layouts-and-customerio).

### Dynamic content, Level I[](#dynamic-content-level-i)

Using a templating language called [Liquid](/journeys/using-liquid/), you can merge in the attributes you’re sending us, like `customer.first_name` or `customer.company_name`, using the syntax `{{customer.first_name}}`.

So if the `first_name` attribute for a customer is Alex, for example, inputting `{{customer.first_name}}` into the composer will render `Alex` in the sent message!

On the other hand, if you’re not sending us that attribute, we’ll show an error. Something like this:

[![image.png](https://docs.customer.io/images/image%28249%29.png)](#b2c0df976a4c54cbf4eed86b637fdcee-lightbox)

### Dynamic content, Level II[](#dynamic-content-level-ii)

Liquid supports minimal logic like if/else/unless, and allows you to loop through an [array](/journeys/liquid-tag-list/#array-filters). For example, if you only wanted to show trial expiry information, but only if the user is on a trial plan, you could do something like this:

```fallback
{% if customer.is_trial_user %}
  <p>Your trial expires on {{customer.trial_expiry_date}}</p>
{% endif %}
```

There’s a lot you can do with Liquid, and we have [separate documentation for that](/journeys/liquid-tag-list/), once you’re ready to dive in.

### Testing your emails[](#testing-your-emails)

It’s good practice to send some test emails to make sure that Liquid code is rendering correctly, among other things. There’s a ‘Send Test’ box in the top-right hand corner of the composer that you can use for this:

[![image.png](https://docs.customer.io/images/image%28250%29.png)](#7f3ea11a7a27d83a5703f9c6880afdba-lightbox)

So pick a customer from the sample data on the left (here we chose “[ami@customer.io](mailto:ami@customer.io)”), and then send your test!

One thing to note: dynamically generated links like a view in browser link and an unsubscribe link are ignored during tests. If you click a test email’s unsubscribe link, you’ll see something like this:

[![test-unsub-link.png](https://docs.customer.io/images/test-unsub-link.png)](#a78414e5c064a1f1d00d0b2bbd0131af-lightbox)

## Laying out your emails[](#laying-out-your-emails)

Want control over how your email looks? Use **Layouts**. A Customer.io layout is the code that wraps around your message text and gives it its appearance and structure. See this example:

[![An example layout with a header, body, and footer.](https://docs.customer.io/images//images/example-layout.png)](#df9e99171caf313134fbe026abbe05ab-lightbox)

`{{content}}` is where your email’s text is inserted when you write it. Everything else is the Layout.

When you’re ready to tackle these, head over to our [Layouts documentation](/journeys/3-layouts-and-customerio).

 Layouts are only available in our rich text or code editors.

You cannot use layouts with [Design Studio](/journeys/design-studio-overview/) or our drag and drop editor; instead, start from a template. Or learn more about the reusable content features available in Design Studio ([components](/journeys/components-overview/)) and the drag and drop editor ([saved rows](/journeys/drag-and-drop/#save-rows), [snippets](/journeys/snippets/)).

## Ready to send? Here’s how it happens![](#ready-to-send-heres-how-it-happens)

When a user meets your campaign trigger and filter conditions and it’s time to send them an email, a lot happens behind the scenes to get data into that email, the email out of Customer.io, and to your user!

After checking that [you’re verified](/journeys/account-verification/), we:

1.  Fetch everything that email needs: things like customer and event data, message content and layout.
2.  Build and render that email. This has a few steps, and their order is **very important**:
    1.  Create the email body. This means that we take all the customer and event data, HTML code, and everything that’s in your message *body* in the composer, and put it all together.
    2.  Take that body, and insert it into the Layout where the `{{ content }}` tag is.
    3.  Add everything else – things like Subject and sender IDs, and render the full email!
3.  Perform some more checks, append URL parameters, and add any attachments.

And *then* the email is sent.

* * *

## Have questions?[](#have-questions)

Need help with the Customer.io basics? No problem, we’re here for you! Just [get in touch](mailto:win@customer.io)!