Plaintext Content for Emails
In addition to the HTML content, you can provide a plaintext version of your email. This is useful for recipients whose email clients do not support HTML or who prefer to read emails in plain text.
Adding Plaintext Content
To add plaintext content to your email template, use the plaintext
Liquid tag. This section is only included if you want to provide a custom plaintext version for your email.
{% plaintext %}
This is the plaintext version of your email. You can use Liquid variables here as well, such as {{ customer.first_name }}.
{% endplaintext %}
- Place the
plaintext
block anywhere in your email template. - Content inside the
plaintext
block will be used as the plaintext alternative for the email. - You can use all the same Liquid variables and logic as in the HTML part of your template.
Best Practices
- Keep the plaintext version concise and easy to read.
- Avoid using HTML tags inside the
plaintext
block. - Make sure important information is present in both the HTML and plaintext versions.
Last updated on