Overview
Emails in SmartrMail are built from blocks, like Text, Image and Product. When none of them does what you need, an HTML block lets you paste your own HTML into the email, alongside your other blocks.
HTML blocks are available on every plan.
Key benefits
Layouts the blocks don’t offer: add a custom table, badge or banner.
Reuse your code: paste HTML snippets you’ve built or sourced elsewhere.
Mix with regular blocks: keep the rest of the email in the editor and code only the part you need.
How to add an HTML block
Open your campaign or automation email in the editor.
In the Blocks tab, choose the number of Columns if you want the block in a row of 2 or 3.
Under Basics, click HTML. It’s added below the selected block. You can also drag it into the email.
The new block shows “Add your HTML”. With the block selected, paste or type your code in the code editor in the settings panel. The email updates as you type.
Good to know: HTML blocks
Styles: inline styles are the safest. CSS in a <style> tag shows in the editor, but some inboxes ignore it.
No JavaScript: <script> tags stay in the email but never run, and their code can show up as stray text in the preview text and the plain-text version. Leave them out.
Test it: click Send test and check the email in a few inboxes before you send.
For what inboxes do and don’t support, see HTML limitations in email.
Move, copy or save an HTML block
Open the block’s Block actions menu to Duplicate it, Duplicate to the right, move it up, down, to the top or to the bottom, Reset block, Save block to reuse it in other emails, or Delete block. You can also drag the block to move it.
Personalize an HTML block
Type merge fields straight into your HTML, in the same format as in text:
Hi {{ name | fallback: 'there' }}, thanks for shopping at {{ store_name }}.
Type the tags yourself rather than copying a field out of a text block, which can paste a different code that won’t fill in. See Using merge fields for the full list.
A whole email in HTML
To send an email written entirely in your own HTML, start a new campaign and choose the Custom HTML tab when you pick a template. Paste your code there instead of building with blocks. See Dynamic tagging for custom HTML for the tags to use.
FAQs
Click a question to open it.
Can I use JavaScript in an HTML block?
Can I use JavaScript in an HTML block?
No. Email clients don’t run it, and the code can show up as text in the email. Leave <script> tags out.
Why does my HTML look different in some inboxes?
Why does my HTML look different in some inboxes?
Each email client supports a different part of HTML and CSS. Use inline styles, keep layouts narrow, and test in the inboxes your customers use.
Is there a size limit?
Is there a size limit?
Long HTML works in the block, but Gmail clips very long emails. See Why are my emails being clipped by Gmail?
Why can’t I add blocks to my email?
Why can’t I add blocks to my email?
The email was made with the Custom HTML option, so it has no blocks. Edit the HTML in the settings instead.
Need a hand with HTML blocks?
Our team is happy to help. Book a 1:1 call with the SmartrMail team and we’ll set it up with you.


