Handlebars Helper Function: domain

Returns the domain portion of an email address, which is the text immediately after the at sign (@).

This helper is available in the Winter ’27 release of Marketing Cloud Next.

ParameterTypeDescription
emailAddressStringRequired. The email address to obtain the domain of.

The function returns the domain portion of emailAddress. If emailAddress doesn’t contain an at sign or isn’t a string, the function returns null.

This example returns the domain portion of an email address.

The function returns:

The helper returns the text after the first at sign. For example, {{domain "sales@force@example"}} returns force@example.