Table of Contents

Email templates

When you create templates for pages intended to be sent out as emails using our built-in Emails tool, you cannot rely on ViewModel-based data, as it's not available in an email context. Instead you can use a set of email placeholder tags to personalize email content in subject fields and email bodies.

The format for using an email placeholder tag is: {{PlaceholderName||"fallback value"}}

The following tags are available:

Placeholder name Description
EmailMessaging:Recipient.Id The recipient id. This is not related to the user id.
EmailMessaging:Recipient.Key The recipient key. When using the "Dynamicweb users" recipient provider, this is the user id.
EmailMessaging:Recipient.Name The name of the recipient.
EmailMessaging:Recipient.Email The email address of the recipient.
EmailMessaging:Message.Id The message id. This identifier is not the email id. If split test is used, there will be one message id for both the original and the variation.
EmailMessaging:Message.SenderName The sender name.
EmailMessaging:Message.SenderEmail The sender email address, or the reply-to email address.
EmailMessaging:Message.Subject The subject. If split test is used, this will contain the subject for the given version (original or variation).
EmailMessaging:Message.DomainUrl The domain url. This url is the domain used for the links in the content.
EmailMessaging:Message.SendDate The send date/time. This is the time when the message was sent. If the email is recurring, this value is updated each time the email is sent.
EmailMessaging:Recipient.Secret The recipient secret used for recipient-specific actions like unsubscribing. This is automatically added to auto-generated unsubscribe links to prevent spoofing. Note: This will cause unsubscribe links generated prior to 8.4.1 to become invalid when upgrading to 8.4.1 or later.
EmailMarketing:Email.PreHeader The pre-header span. This contains the pre-header text wrapped in a span-tag. Must be placed right after the body tag of the page used as email. If the tag is not found, the preheader will be inserted automatically by the system.
EmailMarketing:Email.PreHeader.Clean The pre-header text. This contains the pre-header text.
EmailMarketing:Email.ContentLink.Clean The link to the content page. This contains the link (not in a tag) to the page that provided the content for the email.
EmailMarketing:Email.UnsubscribeLink The unsubscribe link in a tag. This contains the unsubscribe link wrapped in an a-tag using the "Unsubscribe text" as the link text.
EmailMarketing:Email.UnsubscribeLink.Clean The unsubscribe link. This contains the unsubscribe link (not in a tag).
EmailMarketing:Email.UnsubscribeAllLink.Clean The link to completely unsubscribe the recipient using the EmailAllowed property of the User. This tag exists in addition to the regular customizable unsubscribe link to allow for more flexibility. The unsubscribe link is not wrapped in an html anchor (<a>) tag. This value is only available when using the "Dynamicweb users" recipient provider (available from 8.4.1.0). The placeholder needs to be added manually.
EmailMarketing:Email.TrackingImage The tracking image for the email. This can be placed independently of the pre-header (available from 8.4.1.0).
Email:User.UserName The username.
Email:User.Name The name of the user.
Email:User.Address The address of the user.
Email:User.Address2 The address2 of the user.
Email:User.ZipCode The zip code of the user.
Email:User.City The city of the user.
Email:User.Country The country of the user.
Email:User.Phone The phone of the user.
Email:User.PhonePrivate The private phone of the user.
Email:User.PhoneMobile The mobile phone of the user.
Email:User.Fax The fax of the user.
Email:User.CustomerNumber The customer number of the user.
Email:User.Currency The default currency for the user.
Email:User.Image The link to the image of the user. This link is not handled by the internal link management.
Email:User.Company The company of the user.
Email:User.Department The department of the user.
Email:User.JobTitle The job title of the user.
Email:User.PhoneBusiness The business phone of the user.
Email:User.LoginToken The login token for logging the specified User in automatically (available from 8.4.1.0). Example: {{EmailMessaging:Message.DomainUrl}}/loginpage.aspx?Username={{Email:User.UserName}}&PwToken={{Email:User.LoginToken}}
Email:User.SYSTEMNAME_OF_CUSTOM_FIELD It is possible to get custom fields on users out in the email (available from 8.6.1.0). Use the system name of the custom field that should be used, not the name. Example: {{Email:User.AccessUser_CustomTextField}} will get the CustomTextField content out in the mail.
To top