Pardot email templates: HTML, HML merge fields and DKIM
Build Pardot (Account Engagement) email templates with pardot-region, write HML merge fields with defaults, and publish DKIM and tracker domain records.
384,000
On this page
- Which Account Engagement email builder are you using?
- How do you make a Pardot email template editable?
- Can you use your own HTML in the Lightning email builder?
- Is there a Pardot email size or header size limit?
- Pardot merge fields: the HML syntax
- How do you give a Pardot merge field a default value?
- How do conditional merge fields work in Pardot?
- Where Pardot merge fields work, and where they do not
- How do you test Pardot merge fields before sending?
- What DNS records does Account Engagement need?
- Does Account Engagement pass DMARC?
- How do you set up the Pardot tracker domain?
- How do you check it once it is live?
- Sources
Account Engagement, which most people still call Pardot, has two template builders. In a classic email template you paste your own HTML and mark what users may change with three attributes: pardot-region, pardot-repeatable and pardot-removable. In the Lightning Email Template Builder, your HTML goes into HTML components of up to 10K characters each. Both personalize with HML merge fields such as {{Recipient.FirstName}}, which print nothing for an empty field unless you set a default.
The full name is Marketing Cloud Account Engagement, and Salesforce warns that you can expect to see the previous name in a few places, including the app.
Which Account Engagement email builder are you using?
Salesforce keeps two generations of builders side by side. Classic email templates sit on the Content tab and no longer get new functionality. The enhanced builders exist only in the Lightning app: the Email Template Builder, whose templates Sales and Service users can send too, and the email content builder.
| Topic | Classic email template | Email Template Builder and email content |
|---|---|---|
| Your own HTML | Pasted into the HTML view of the Building tab | Inside HTML components, 10K characters each |
| What users can edit | Set with pardot-region, pardot-repeatable and pardot-removable | The template's unlocked sections |
| Merge language | HML, or legacy variable tags in older business units | HML only |
| Dynamic content and A/B tests | Available | Not supported |
The last two rows come from Salesforce's considerations for the enhanced email experience.
How do you make a Pardot email template editable?
A classic template is editable everywhere by default. Add one attribute and that flips: every element without one is locked. On the Building tab, click HTML and mark each element:
pardot-regionlets users edit the element's content.pardot-repeatablelets users copy or move it.pardot-removablelets users remove it.
Nest different attributes to combine them. Salesforce's example makes a sidebar removable and editable:
<td width="200">
<div pardot-removable="sidebar-1">
<div pardot-region>
<h1>Title</h1>
A paragraph of text
<a href="#">Read More</a>
</div>
</div>
</td>Click Publish to Template when you are done. The restrictions do not apply to emails created with the Send Account Engagement Email button.
- Logo and header
No attribute: locked. A template with at least one attribute locks everything that has none.
pardot-regionHeadline and introUsers edit the content of the element.
pardot-repeatablepardot-regionArticle rowUsers copy or move the row, and edit the region inside each copy.
pardot-removablepardot-regionSidebar offerUsers delete the block, or edit it. This is the pair in Salesforce's own example. Only different attributes can be nested.
- Footer
{{Unsubscribe}} {{EmailPreferenceCenter}}No attribute: locked. The unsubscribe link every marketing email needs stays out of reach.
pardot-region: the content can be editedpardot-repeatable or pardot-removable: the block can be copied, moved or deletedNo attribute: locked
Keep the unsubscribe link in a locked block. Salesforce requires an Unsubscribe or Email Preference Center link in all marketing emails, {{Unsubscribe}} or {{EmailPreferenceCenter}} in HML, and adds a List-Unsubscribe header itself, which covers the one-click unsubscribe Gmail and Yahoo ask for.
Can you use your own HTML in the Lightning email builder?
Yes, through the HTML component. Salesforce sets the same limits for both enhanced builders: 250 components per template or email content record, 100 per region, and 10K characters per component property. Clicking Format can push the code over and block the save, so split long code across two HTML blocks. An email content record's HTML body holds up to 384,000 characters and can be edited only in the builder, not on the record or through the API.
The Email Template Builder guidelines refuse active content in HTML and Rich Text components, including JavaScript, animated images, embedded objects and HTML comments, but allow Microsoft Office (MSO) tags. They do not say whether an <!--[if mso]> conditional comment counts as an MSO tag or a comment, so check any VML button in a classic Outlook render. The same page adds:
- A
<style>tag is not supported in a rich text field that also holds merge fields. - SVG is not supported, and an
<img>src should start withhttps://. - A template edited in the Email Template Builder can only be edited there afterwards.
- Below 320 px wide, columns in a row stack.
Email content takes images from one Salesforce CMS channel only, and Salesforce Files do not load when the email sends. Only Email Template Builder templates can start an email content record, and selecting one copies its Subject and HTML Body into the record. As of October 2026 the builder also offers a New email experience, which Salesforce documents under Marketing Cloud Growth; this guide covers the existing one.
Is there a Pardot email size or header size limit?
The docs we read give no header image size and no body width. The limits they do give are high: 384,000 characters of HTML body, 10K per HTML component, 25 MB per CMS image and 50 MB per hosted file. The limit you meet first is Gmail's: it clips messages over 102 KB.
Pardot merge fields: the HML syntax
Handlebars Merge Language (HML) works in email templates, list emails, 1:1 emails, dynamic content, landing pages, forms and user signatures. An email or template holds up to 200 HML merge fields. The common ones, from Salesforce's full list of HML merge fields:
| Merge field | What it shows |
|---|---|
{{Recipient.FirstName}} | The prospect's First Name field |
{{Recipient.Company}} | The prospect's Company field |
{{Recipient.Account.Name}} | The Name field of the prospect's account |
{{Recipient.Owner.FirstName}} | The assigned user's first name |
{{Sender.FirstName}} | The sending user's first name |
{{Recipient.<custom_field_api_name>}} | A custom field on the prospect record |
{{Unsubscribe}} | Link to the default unsubscribe page |
{{EmailPreferenceCenter}} | Link to the default Email Preference Center page |
{{View_Online}} | Link to view the email in a web browser |
Two braces return the value HTML-escaped, three return it raw. Salesforce's page on HML modifiers gives the case to watch: a company name with an ampersand arrives as &, and {{{Recipient.Company}}} fixes it.
The legacy variable tags, such as %%first_name%%, are still documented but not available in business units created after June 12, 2020, and the enhanced builder does not support them.
How do you give a Pardot merge field a default value?
If a prospect's record has no value for a field, nothing is displayed, so Hi {{Recipient.FirstName}}, goes out as "Hi ,". HML has no fallback inside the tag. There are two ways around it.
The first is a default on the field: in the Lightning app, Account Engagement Settings, Configure Fields, Prospect Fields, edit the field, and set a Default Mail Merge Value. It needs the Administrator role, and it fills the field wherever it is merged, so a word that reads well after "Hi" has to read well everywhere else too.
The second is a conditional statement in the email. The two do not combine: if the field has a default value, the default populates instead of the statement. Salesforce does not show the exact output, but either way your {{else}} text is not used. Pick one method per field.
A. The merge field alone
Hi {{Recipient.FirstName}},B. Wrapped in a conditional
{{#if Recipient.FirstName}}
Hi {{Recipient.FirstName}},
{{else}}
Hi there,
{{/if}}Hi there, never shows.What goes out when the field is empty and nothing catches it
How do conditional merge fields work in Pardot?
Salesforce writes the conditional HML syntax as {{#if field.name}} {{else}} {{/if}}. For the greeting:
{{#if Recipient.FirstName}}
Hi {{Recipient.FirstName}},
{{else}}
Hi there,
{{/if}}It tests whether a field is empty, not what it holds: you can show content because City has a value, not because the city is San Francisco. You can nest up to three statements. For a merge field inside a link, Salesforce puts each URL on its own line:
{{#if Merge.Field}}
https://www.example.com{{Merge.Field}}
{{else}}
https://www.example.com/signup
{{/if}}Where Pardot merge fields work, and where they do not
- Subject lines. Use the Advanced Subject Composer in your email draft. The Email Template Builder has no merge field picker for the subject, but you can type merge fields in by hand.
- Preheaders. The pages we read do not mention a preheader field.
- Links. A merge field in a URL fills in when the prospect clicks, not at send. For the legacy tags, Salesforce says to merge only the last part of the URL so
https://stays visible, a sensible habit with HML too. - Fields that live in one system. In email content, fields that exist only in Account Engagement are not available; map them to Salesforce fields. A field found only in Salesforce means the email cannot be sent from the enhanced experience.
- Templates that sales also sends. Keep Account Engagement-only fields such as Email Preference Center out of them; they break when Sales or Service users send the template.
How do you test Pardot merge fields before sending?
In the enhanced experience, test emails do not include merge field data. Use Preview As with a prospect whose First Name is empty, then one with a name. A test goes out only if a sending domain is verified, and sends to test lists count in Engagement History, so tie them to a test campaign.
What DNS records does Account Engagement need?
Every domain your users send from needs adding and verifying, because the sender's address decides the sending domain. As of October 2026 that is Account Engagement Settings, then Domain Management, in the Lightning app. Click Add New Domain, copy the values under Expected DNS Entries, publish them, and click Check DNS Entries.
| Record | Type | Host | Value |
|---|---|---|---|
| Validation key | TXT | example.com, or a parent domain | The key under Expected DNS Entries |
| DomainKey (DKIM) | TXT | 200608._domainkey.example.com | The public key under Expected DNS Entries |
| Tracker domain | CNAME | go.example.com | go.pardot.com, or go.demo.pardot.com for a sandbox |
| Tracker validation | TXT | example.com | The key under the tracker domain's "Not validated" message |
Hosts and values are from Salesforce's DNS configuration tips for Account Engagement. The validation key proves ownership, and nothing sends from the domain without it. The DomainKey is a TXT record at the selector 200608, and signing can take up to 24 hours to start. If your DNS host appends the domain to what you type, enter only the part before it.
The key is 1024-bit by default. A 2048-bit key takes a support case, and Salesforce highly recommends a dedicated IP for it. Its notice on the 2024 Gmail and Yahoo changes says Domain Management will not show a 2048-bit key as verified. The same notice says DKIM is not required to send, but a domain without it is not considered fully authenticated. Publish it.
Does Account Engagement pass DMARC?
Yes, through DKIM. Account Engagement signs DKIM with your email sending domain, so the signature aligns with your From address. SPF passes on its own, and no SPF configuration is needed on your end, but it passes for a Salesforce return-path domain such as bounce.s7.exacttarget.com, which does not align.
For SPF alignment too, ask support for a custom return path, one per business unit. Account Engagement does not capture DMARC failure reports, so read your aggregate reports with a reporting service. SPF, DKIM and DMARC explained covers alignment in detail.
How do you set up the Pardot tracker domain?
The tracker domain rewrites links and vanity URLs so tracking runs through your own subdomain. Under Domain Management, click Add Tracker Domain, point a CNAME at go.pardot.com, add the validation key as a TXT record on the root domain, then choose Validate from the domain's gear menu. Business units created after February 15, 2021 use HTTPS by default; older ones enable SSL for each tracker domain.
Salesforce's DNS tips add three rules. Never use the same name for the tracker and the sending domain. Set one validated domain as primary to rewrite every asset's URLs to it. And to test, open the tracker domain in a browser: it should redirect to your website.
How do you check it once it is live?
Domain Management marks each record verified. Then send yourself a real email and read its Authentication-Results header: DKIM should pass with d=example.com, SPF for the bounce domain, and DMARC overall. From a terminal:
dig +short TXT 200608._domainkey.example.com
dig +short CNAME go.example.com
dig +short TXT _dmarc.example.comThe free editor exports HTML for a classic template with HML merge fields, {{#if}} fallbacks and {{Unsubscribe}} written in. Before a send, the free mail-merge preview flags every empty merge field across a list, and the email domain checker reads SPF, DKIM and DMARC in one pass; give it 200608 as the selector. Draftship also builds and runs outbound inside a client's own platform.
Sources
- help.salesforce.comthree attributes: pardot-region, pardot-repeatable and pardot-removable
- help.salesforce.comHTML components of up to 10K characters each
- help.salesforce.comyou can expect to see the previous name in a few places
- help.salesforce.comtwo generations of builders side by side
- help.salesforce.comconsiderations for the enhanced email experience
- help.salesforce.comrequires an Unsubscribe or Email Preference Center link in all marketing emails
- help.salesforce.comEmail Template Builder guidelines
- help.salesforce.comcopies its Subject and HTML Body into the record
- help.salesforce.com50 MB per hosted file
- help.salesforce.comemail templates, list emails, 1:1 emails, dynamic content, landing pages, forms and user signatures
- help.salesforce.comSalesforce's full list of HML merge fields
- help.salesforce.compage on HML modifiers
- help.salesforce.comnot available in business units created after June 12, 2020
- help.salesforce.comDefault Mail Merge Value
- help.salesforce.comthe default populates instead of the statement
- help.salesforce.commerge only the last part of the URL
- help.salesforce.comcannot be sent from the enhanced experience
- help.salesforce.comtest emails do not include merge field data
- help.salesforce.comthe sender's address decides the sending domain
- help.salesforce.comClick Add New Domain, copy the values under Expected DNS Entries, publish them, and click Check DNS Entries
- help.salesforce.comDomainKey is a TXT record
- help.salesforce.comsigns DKIM with your email sending domain