Using Email Templates in Xeams

Several features in Xeams enable you to surround your email content with predefined templates, giving your messages a consistent and more professional appearance. For example, when using the Email Campaign plugin, you can apply one of these templates to your outgoing message.

Although a handful of templates are included with Xeams, you can easily modify the existing templates or create as many new templates as you need. The following rules apply when you create or modify templates:

  • Templates must be in HTML format, and the file extension must be *.html or *.htm.
  • They are stored in the $INSTALL_DIR\EmailTemplates folder. $INSTALL_DIR refers to the installation path of your Xeams instance, which is typically set to C:\Xeams on Windows and /opt/Xeams on Linux.
  • The file names for every template must start with a numeric value followed by a dash. For example: 6-MyCustomTemplate.html. The numeric value in the beginning serves as an identifier and cannot be repeated.
  • The template HTML may contain one or more placeholders, enclosed by two hash symbols. For example, ##EMAIL_BODY##. These place holders will be replaced by actual data when a template is applied. Refer to the table below for a complete list of placeholders.

Placeholders

As mentioned above, placeholders are used to identify dynamic content. In other words, their values will be assigned when a message is created. The following table lists available placeholders.

Name Description
EMAIL_BODY This is a mandatory placeholder. It will be replaced by the actual body of the message.
RECIPIENT_EMAIL Email address of the recipient.
SENDER_EMAIL Sender's Email address
SUBJECT Subject of the message
CURRENT_DATE Current date without time
CURRENT_DAY_OF_MONTH Day of the month
CURRENT_MONTH Current month. January is 1, February is 2, and so on.
CURRENT_YEAR Current year.