Marketo email template syntax: modules, tokens and DKIM

How Marketo templates become editable (mktoText, mktoModule, variables), token defaults that never print an empty name, and DKIM that passes DMARC.

500

Emails on one Marketo template after which Adobe suggests starting a new one
On this page
  1. What is Marketo's email template syntax?
  2. Where does Marketo rewrite or detach your HTML?
  3. What changed with the Email Designer?
  4. How do Marketo tokens and default values work?
  5. How do you set up SPF and DKIM in Marketo?
  6. Sources

A Marketo email template is plain HTML in which class names mark what an author may edit: mktoText, mktoImg, mktoSnippet and mktoVideo for single regions, <meta> variables such as mktoColor that the template prints as ${id}, and mktoModule sections inside one mktoContainer. A token such as {{lead.First Name:default=there}} prints the text after default= when the field is empty. To authenticate, add include:mktomail.com to SPF, publish a custom DKIM key for each From domain, and align DMARC on DKIM, as Adobe recommends.

<head>
<meta class="mktoColor" id="textColor" mktoName="Main Text Color" default="#FFFFFF">
VariableThe author sets the value in the editor. The template prints it wherever it says ${textColor}.
</head>
<body><table><tr>
<td class="mktoContainer" id="body">
ContainerWhere modules may go. One per template, and nothing but modules inside it.
<table class="mktoModule" id="hero" mktoName="Hero">
ModuleA table, because its container is a td. Authors insert, remove and reorder modules.
<div class="mktoImg" id="heroImg" mktoName="Hero Image" mktoImgWidth="600"></div>
Image elementThe author picks the image. mktoImgWidth sets the width of the img it inserts.
<div class="mktoText" id="intro" mktoName="Intro" style="color:${textColor};">
Rich text elementWhat is inside is the default text. Its colour comes from the variable.
Hi {{lead.First Name:default=there}},
TokenFilled in for each person. The word there is printed when First Name is empty.
</div>
</table>
</td>
</tr></table>
<div class="mktoSnippet" id="unsubscribeFooter" mktoName="Unsubscribe Footer" mktoDefaultSnippetId="12"></div>
Snippet elementOutside the container, so it belongs to no module. The author chooses an approved snippet.
</body>

Underlined in orange: the class that tells Marketo what kind of editable region this is

Example. A template cut down to its Marketo parts. The classes, attributes and nesting rules are from Adobe’s Email Template Syntax page, last updated 7 October 2026; the ids, names and width are made up.

What is Marketo's email template syntax?

Adobe documents it for Email Editor 2.0, the classic editor, on the Email Template Syntax page, last updated 7 October 2026. Four rules hold throughout:

  • Class values such as mktoText are case sensitive. Attribute names such as mktoname are not.
  • Every id must be unique and use only letters, numbers, dashes and underscores.
  • mktoName is the label authors see in the editor.
  • The syntax works in templates and individual emails, and does nothing inside a snippet or a Rich Text token.

Editable elements: mktoText, mktoImg, mktoSnippet and mktoVideo

ClassWhat the author can doNotes
mktoTextEdit rich textWhatever sits inside the tag is the default. Older templates use mktEditable, which still works.
mktoImgPick an imageOn a div the author can also add a link. On an img they cannot.
mktoSnippetChoose an approved snippetmktoDefaultSnippetId sets the first one. It cannot be turned into rich text.
mktoVideoPaste a YouTube or Vimeo URLThe email shows a thumbnail with a play button.

Each is written with its class, an id and a mktoName. Adobe's examples:

<div class="mktoText" id="exampleText" mktoName="Main Body Text"> Optionally add default text for the editable text area. </div>
<div class="mktoImg" id="exampleImg" mktoName="Example Image" mktoImgLink="https://www.adobe.com"> <a><img style="border:10px solid red;"></a> </div>
<div class="mktoSnippet" id="unsubscribeFooter" mktoName="Unsubscribe Footer" mktoDefaultSnippetId="12"></div>
<div class="mktoVideo" id="productVideo" mktoName="Product Announcement Video"></div>

Keep the empty <a> around the <img> in an image element. Adobe says it stops your inline styles being stripped when an author adds a link.

Variables: mktoString, mktoColor, mktoNumber, mktoBoolean, mktoList and mktoHTML

Variables are <meta> tags in the <head>. The author sets each value in the editor, and the template prints it wherever it writes ${textHeader}, ${textColor} and so on:

<meta class="mktoString" id="textHeader" mktoName="Text Header" default="Edit Me">
<meta class="mktoColor" id="textColor" mktoName="Main Text Color" default="#FFFFFF">
<meta class="mktoNumber" id="textFontSize" mktoName="Main Text Font Size" default="12" min="8" max="18" units="px" step="1">
<meta class="mktoBoolean" id="showFooter" mktoName="Show Footer BG?" default="false" false_value="transparent" true_value="black" false_value_name="NO" true_value_name="YES">
<meta class="mktoList" id="textFontFamily" mktoName="Main Text Font Family" values="Arial,Verdana,Times New Roman">
<meta class="mktoHTML" id="trackingPixel" mktoName="Add Tracking Pixel">

mktoString escapes HTML unless allowHTML is true, and a <meta class="mktoImg"> returns only an image URL. A variable is global, shared by every copy of a duplicated module, unless you add mktoModuleScope="true".

Modules and the one container

A container is a table, tbody, thead, tfoot or td with class="mktoContainer". In a td container each module is a <table class="mktoModule">; in the others it is a <tr class="mktoModule">. A module needs an id and a mktoName. mktoActive="false" stops authors adding it, and mktoAddByDefault="false" leaves it off new emails.

Three rules on the same page catch most broken templates: one container per template, nothing but modules inside it, and later changes to a template's modules never reach emails already made from it.

Where does Marketo rewrite or detach your HTML?

  • Colour values are lowercased. The classic editor lowercases color and background-color values, so Adobe's template guide says to avoid camel case there.
  • Edit Code can detach an email. Changing anything outside an element or module, or a non-mkto attribute such as style on an element outside a module, breaks the email from its template. Editing inside modules does not.
  • Save as Template drops variable values and keeps the template's defaults.
  • Past 500 emails on one template, Adobe suggests starting a new one, because re-approving it can cause performance issues.

What size should a Marketo email banner be?

Adobe publishes no banner size and no maximum width; your template sets the width. Put mktoImgWidth and mktoImgHeight on the image element so a banner goes in at your size. Adobe describes mktoLockImgSize, which defaults to true, as the attribute that unlocks the size. That reads both ways, so check whether authors can resize the image.

What changed with the Email Designer?

Adobe calls the editor after Email Editor 2.0 the Email Designer; its documentation does not call it Email Editor 3.0. It needs a subscription migrated to Adobe's identity system (IMS), and the classic editor will be retired with several months' notice, with no date given as of October 2026.

AreaIn the Email Designer
Classic templatesMust be imported, and then their variables are not available at the email level and their snippets stop working.
Your own HTMLImported HTML stays in Compatibility mode, editable only as text, links and assets, until you run the HTML converter.
An outer <table>As the top layer it can lose its background and width.
Raw codeAdvanced HTML mode does not validate, and you cannot save in it.
My TokensTemplates do not support them. Put them in emails.
The APICannot edit Designer assets.

From 23 May 2025 Adobe rolled out a Designer token format with no spaces in field names. That page gives the classic form and the new one:

{{lead.City:default=fallback}}
{%=lead.city ?: "fallback" %}

Yet Adobe's Designer authoring page still shows {{lead.First Name:default=Friend}}. Insert one token from the picker and copy what it writes before you type tokens by hand.

How do Marketo tokens and default values work?

The Tokens Overview lists the token types:

Token typeExampleValue comes from
Person{{lead.First Name}}Person fields, custom ones by display name
Company{{Company.Company Name}}Company fields
My Token{{my.Event Date}}A program or folder
Program{{program.Name}}The program
Campaign{{campaign.name}}The smart campaign
Trigger{{trigger.Name}}What triggered the campaign
System{{system.date}}Marketo
Member{{member.webinar url}}An integrated partner, such as a webinar service

How do you set a default value for a Marketo token?

Add :default= and the text to print when the field is empty:

Hi {{lead.First Name:default=there}},

The classic token dialog writes this from its Default Value field, which Adobe's personalization quick win says to always fill in; the Designer calls it fallback text. Adobe does not document what goes out when the field is empty and there is no default, so treat a token without one as a bug.

For more than a fallback, use dynamic content by segment or a Velocity email script token, which supports if and else.

What are My Tokens in Marketo?

My Tokens are {{my.}} tokens created on a program or folder, inherited by everything below it and overridable at a lower level. A Text token holds up to 524,288 characters. My Tokens do not resolve in emails sent from Sales Insight, though their defaults do, and nested tokens are not supported in batch campaigns.

Where do Marketo tokens not work?

PlaceTokens
Subject, From, From Address, Reply-toYes, from the token icon beside each field (Adobe)
PreheaderNot from the email editor, only in your own template HTML (Adobe)
Link URLsYes. For a URL held in a My Token, type https:// outside the token or clicks are not tracked (Adobe)
Email script outputPrint the whole <a> tag. Links printed inside a loop are not tracked (Adobe)
Snippets and Rich Text tokensTemplate syntax does not run there (Adobe)

Where do the unsubscribe and view-online tokens go?

{{system.unsubscribeLink}} and {{system.viewAsWebpageLink}} go in a link's URL; outside an anchor they are not clickable, and they cannot sit inside a My Token. Marketing emails, not operational ones, also get unsubscribe text appended from Admin, Email (Adobe). If you edit it, keep %mkt_opt_out_prefix% and mkt_unsubscribe=1&mkt_tok=##MKT_TOK##. Adobe's default:

<p><font face="Verdana" size="1">If you no longer wish to receive these emails, click on the following link: <a href="%mkt_opt_out_prefix%UnsubscribePage.html?mkt_unsubscribe=1&mkt_tok=##MKT_TOK##">Unsubscribe</a><br/></font></p>

If your templates carry their own link, Adobe's way to remove the appended unsubscribe text is an HTML comment in its place, because the box cannot be saved empty.

How do you test Marketo tokens before sending?

Send Sample resolves tokens as the person you pick in its person drop-down, and My Tokens from the email's program (Adobe). Every address you enter is shown to the others, so send samples to your own mailbox. Test a person with an empty first name as well as one with a full one.

How do you set up SPF and DKIM in Marketo?

  • SPFTXT
    Hostexample.comValuev=spf1 mx ip4:[CorpIP] include:mktomail.com ~all

    Or add include:mktomail.com to the record you have. It counts for DMARC only with a branded return-path.

  • DKIMTXT
    Hostm1._domainkey.example.comValue[TXT Value from Marketo]

    Marketo shows the Host Record and TXT Value after you add the domain and choose a selector. It then signs with d=example.com, which aligns with a From address at example.com.

  • DMARCTXT
    Host_dmarc.example.comValuev=DMARC1; p=none; rua=mailto:dmarc@example.com

    Adobe's minimum is v=DMARC1; p=none. The rua address is where aggregate reports go.

  • Email tracking linksCNAME
    Hostgo.example.comValue[the default branding domain Marketo assigned]

    Then replace the generic entry in the Branding Domains table, under Admin, Email.

  • Landing pagesCNAME
    Hostpages.example.comValue[MunchkinID].mktoweb.com

    Puts landing pages on your domain. Neither CNAME takes part in SPF, DKIM or DMARC.

Underlined in orange: the selector, which you choose in Marketo and which the host name must repeat

Example. The records Marketo asks for, for a From address at example.com, from Adobe’s Configure Protocols for Marketo Engage and Set up a Custom DKIM Signature. Bracketed values come from your own instance. The DKIM host follows the selector._domainkey pattern of RFC 6376, and the selector and host names are made up.

SPF. Adobe gives this record for a domain with no SPF yet, with your domain and corporate mail server IP filled in:

[domain] IN TXT v=spf1 mx ip4:[corpIP] include:mktomail.com ~all

If you already have a record, add include:mktomail.com to it, since two SPF records on one name make SPF fail.

DKIM. Marketo signs with a shared signature until you set up a custom DKIM signature, as of October 2026 under Admin, Email, the SPF/DKIM tab, Add Domain. Enter your From domain, choose a selector and a key size (Adobe recommends 2048), publish the Host Record and TXT Value it gives you, then click Check DNS. The key must reach every nameserver for the domain. A From domain you have not added keeps the shared signature.

To change the selector or key size, delete the domain in Marketo and publish a new record. Adobe says your domain is not signed until the new record validates, which can take 24 to 48 hours. Delete the entry in Marketo before you change the DNS record, too.

Does Marketo DKIM align with DMARC?

Yes, once the custom DKIM domain is your From domain, and Adobe's setup guide recommends DMARC alignment on DKIM for Marketo. SPF rarely aligns. The default Return-Path is on Marketo's mailbox subdomains, which is why Adobe tells mail filters to allowlist *.mktomail.com, and SPF checks only that envelope domain. An aligned SPF pass needs a branded return-path, which Adobe Support sets up for dedicated IPs and its Trusted IP program. Strict SPF alignment is not supported.

Adobe's bare minimum DMARC record is v=DMARC1; p=none. Add a rua address, read the reports, then move to p=quarantine and decide on p=reject. The SPF, DKIM and DMARC explainer covers alignment in full.

How do you set up the Marketo tracking domain CNAME?

Marketo asks for two CNAMEs, both in the figure above: a landing page host pointing at [MunchkinID].mktoweb.com, and an email tracking host pointing at the default branding domain Marketo assigned you (Adobe). Then edit the generic entry in Branding Domains under Admin, Email, and ask Adobe Support for an SSL certificate, which can take up to 3 business days. Use a CNAME: a branding domain set up as an A record locks you out of adding more.

How do you check Marketo authentication once it is live?

After Check DNS passes, send a sample to your own mailbox. Its DKIM-Signature header should carry d= with your domain and s= with your selector, and Authentication-Results should show dmarc=pass. The header analyzer reads those headers for you, and the DKIM checker looks up a key by its selector.

The free editor exports Marketo template HTML with this syntax written in: one mktoContainer, every row a mktoModule, every heading and text block mktoText, and tokens with :default= fallbacks. Before a send, the free mail-merge preview reads a draft against a CSV of your list and flags every empty merge field, in its own tag syntax rather than Marketo's, and the email domain checker reports SPF, DKIM and DMARC together. 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