Overview
Emails built with the drag-and-drop composer are made up of blocks — for example, a text block, an image block, or a product block. If you want something our preset blocks don't offer, you can add your own custom HTML as a block instead.
Key benefits / use cases
Add custom layouts or content our preset blocks don't support
Reuse HTML snippets you've built or sourced elsewhere
Combine with a custom template (from the Design page) for full creative control
How to add an HTML block
Scroll to the bottom of the composer to find the Add New Section panel.
Under Type, click HTML. (This panel also lists Layout options — 1, 2, or 3 columns — and other block types like Product, Text, Image, Button, Image + Caption, Video, Coupon, Line, Smart products, and Custom trigger products, plus the option to add a saved block.) An HTML block appears with placeholder text reading "Your custom html will appear here."
Add your HTML code in the block. This is a code editor with line numbers, not a plain text field — changes render live in the composer as you type, so you can see how your HTML looks instantly without a separate save or preview step.
Managing an HTML block
Click the three-dot menu on any HTML block for more options: Clone right, Clone below, Move to top, Move to bottom, Reset block, Save block, and Delete.
Styling your HTML block
Both inline styles and <style> blocks render correctly — you're not limited to inline styling only. That said, mobile-first design is still worth following, since screen sizes and email clients vary widely and desktop-width layouts won't always look right everywhere.
A caution on script tags
<script> tags aren't stripped or blocked — they'll pass through into your email's HTML. However, no email client executes JavaScript in emails, so a script will never actually run. Worse, the script's code can leak out as plain, visible text in places like the hidden preview text (preheader) some inboxes show before an email is opened, and in the plain-text version of the email. We recommend avoiding <script> tags in your HTML block entirely.
Personalizing an HTML block
SmartrMail has two merge tag formats. The percent-style tag generated by a Text block's personalization picker (e.g. %recipient.store_name579824%) won't resolve if typed by hand into the HTML block — it'll show up as raw text. The Liquid-style format (e.g. {{ store_name | fallback: 'no data' }}) does resolve correctly when typed directly into the HTML block. If you want personalization in an HTML block, use the Liquid-style syntax rather than copying a tag from a Text block's picker.
Content length
There's no known practical limit on content length — test blocks of 5,000 and 20,000 characters both saved and rendered without issue.
Using Custom trigger products
The Custom trigger products block type is tied to SmartrMail's Custom Events feature and requires a Custom Event to already be configured on your account — otherwise it will show a "Custom event setup is not complete" message instead of its usual options.
FAQs
Can I use JavaScript in an HTML block?
Technically, <script> tags aren't stripped or blocked — they'll be included in your email's HTML. But no email client executes JavaScript, so the script will never run. On top of that, its code can leak out as visible, garbled text in the hidden preview text (preheader) some inboxes show, and in the plain-text version of the email. We recommend avoiding <script> tags in your HTML blocks.
Will my custom CSS work the same way it does in a browser?
Both approaches work in the HTML block — inline styles and <style> blocks were tested and both rendered correctly (a <style> block successfully turned text red, and inline styling successfully turned separate text blue). Mobile-first design is still worth keeping in mind, since screen sizes vary widely across email clients.
Can I use personalization/merge tags in an HTML block?
Yes, but the syntax matters. A percent-style tag copied from a Text block's personalization picker (e.g. %recipient.store_name579824%) won't resolve if typed into the HTML block — it'll appear as raw text. Instead, use Liquid-style syntax typed by hand, e.g. {{ store_name | fallback: 'no data' }}, which resolves correctly.
Is there a character or size limit on the HTML block?
No known practical limit — blocks of 5,000 and 20,000 characters have both been tested successfully.
Can I move or delete an HTML block after adding it?
Yes — the HTML block can be repositioned or deleted the same way as any other block type.
What plan do I need to add HTML blocks?
HTML blocks are available on all SmartrMail plans.


