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

Characters the HTML body of an Account Engagement email content record can hold
On this page
  1. Which Account Engagement email builder are you using?
  2. How do you make a Pardot email template editable?
  3. Can you use your own HTML in the Lightning email builder?
  4. Is there a Pardot email size or header size limit?
  5. Pardot merge fields: the HML syntax
  6. How do you give a Pardot merge field a default value?
  7. How do conditional merge fields work in Pardot?
  8. Where Pardot merge fields work, and where they do not
  9. How do you test Pardot merge fields before sending?
  10. What DNS records does Account Engagement need?
  11. Does Account Engagement pass DMARC?
  12. How do you set up the Pardot tracker domain?
  13. How do you check it once it is live?
  14. 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.

TopicClassic email templateEmail Template Builder and email content
Your own HTMLPasted into the HTML view of the Building tabInside HTML components, 10K characters each
What users can editSet with pardot-region, pardot-repeatable and pardot-removableThe template's unlocked sections
Merge languageHML, or legacy variable tags in older business unitsHML only
Dynamic content and A/B testsAvailableNot 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-region lets users edit the element's content.
  • pardot-repeatable lets users copy or move it.
  • pardot-removable lets 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.

  1. Logo and header

    No attribute: locked. A template with at least one attribute locks everything that has none.

  2. pardot-regionHeadline and intro

    Users edit the content of the element.

  3. pardot-repeatable
    pardot-regionArticle row

    Users copy or move the row, and edit the region inside each copy.

  4. pardot-removable
    pardot-regionSidebar offer

    Users delete the block, or edit it. This is the pair in Salesforce's own example. Only different attributes can be nested.

  5. 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

Example. A classic Account Engagement email template with its editable attributes. The attributes and what each one allows are Salesforce's (Control How Users Can Change Email Template Content); the blocks are made up. The footer fields are from Salesforce's HML field list.

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 with https://.
  • 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 fieldWhat 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 &amp;, 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}}
The prospect recordReader sees with AReader sees with B
First Name is AdaHi Ada,Hi Ada,
First Name is empty, no default setHi ,Nothing is displayed for an empty field.Hi there,
First Name is empty, Default Mail Merge Value is FriendHi Friend,The default, Friend, populates instead of the statement.Hi there, never shows.

What goes out when the field is empty and nothing catches it

Example. One greeting sent to three prospect records. An empty field displays nothing (HML guidelines), and a field's default value populates instead of a conditional statement (conditional merge fields). Salesforce does not show the full output of that last case, so the cell gives only what it states. The default is set on the field (default mail merge values).

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

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.

RecordTypeHostValue
Validation keyTXTexample.com, or a parent domainThe key under Expected DNS Entries
DomainKey (DKIM)TXT200608._domainkey.example.comThe public key under Expected DNS Entries
Tracker domainCNAMEgo.example.comgo.pardot.com, or go.demo.pardot.com for a sandbox
Tracker validationTXTexample.comThe 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.com

The 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

Who do you want to hear back from?

Tell us who you sell to and what you have tried. We'll get back to you ASAP, and if it looks like a fit, we build it into your systems within days.

Or write to hello@draftship.io