Runtime verified Test scripts included

Returns everything behind the first @ of an email address, or null when the input has no @ or is not a string.

Syntax

{{domain emailAddress}}

Returns string.

Parameters

Name Type Required Description
emailAddress string Yes The email address to read the domain from.

Example

Tested in a Marketing Cloud Next email on 2026-11-22:

  • {{domain "sales@force@example"}} renders force@example, as documented.
  • {{domain "user@example.com"}} renders example.com, as documented.
Show Next test script
<!-- Marketing Cloud Next test script for the domain helper. Paste it into the HTML component of a
     Next email and open the preview. Each line prints the result Next gave when the call
     was rendered on its own (expect) next to the result of this run (got).
     Assembled from single-call test emails (dates on the page); it has not been
     run as one email. Calls that make Next fail are listed separately. -->
<p>c1 expect=[force@example] got=[{{domain "sales@force@example"}}]</p>
<p>c2 expect=[example.com] got=[{{domain "user@example.com"}}]</p>

Marketing Cloud Next

Works as documented

Every tested call rendered the documented result. Tested 2026-11-22 by rendering in a Marketing Cloud Next email.

See also