Skip to main content

 Configuration

Configuration manual for PageSeeder

Email format

This document explains how PageSeeder can be configured to send emails in HTML, plain text or both (default).

HTML emails

Each email is generated by a template in XSLT which is responsible for generating the content sent by email.

To send HTML emails:

  1. The template must be located in the Notification folder and have one of the reserved template names. See list of templates (for example: change-password.xsl).
  2. The output format is set by PageSeeder to be XHTML with a doctype declaration of -//W3C//DTD XHTML Basic 1.0//EN.
  3. The XSLT has the following structure.

Basic template structure

<!-- Email template -->
<xsl:stylesheet version="2.0"
                xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<!-- Use UTF-8 and proper HTML doctype -->
<xsl:output encoding="UTF-8"
            method="html"
            indent="yes"
            omit-xml-declaration="yes"
            doctype-public="-//W3C//DTD HTML 4.01 Transitional //EN" />

<xsl:template match="/notification">
<html>
  <head>
    <title>[Subject of Email]</title>
    <meta http-equiv="Content-Type"
          content="text/html; charset=UTF-8" />
    <!-- Other Meta elements can go here ... -->
  </head>
  <!-- HTML content -->
  <body>
    <!-- HTML content goes here -->
  </body>
</html>
</xsl:template>

</xsl:stylesheet>

Recommendations

HTML emails are quite hard to design as email clients have a tendency to behave differently with various standards. The guidelines when writing HTML emails are as follows:

  • Use basic HTML (such as tables, headings and paragraphs).
  • Use tables for layout, or even nested tables.
  • No inline images.
  • No inline javascript.
  • Use web-safe fonts.
  • Use inline CSS.

Plain text emails

The content of text emails is also generated by XSLT templates which must:

  1. Be located in the Notification folder.
  2. Have a filename that follows the format [template name]-text.xsl. See list of templates (for example: change-password-text.xsl).
  3. Have a plain text output format.

Basic template structure

<!-- Email template -->
<xsl:stylesheet version="2.0"
                xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<!-- Use ASCII -->
<xsl:output encoding="ASCII" method="text" />

<xsl:template match="/notification">
  <!-- plain text content goes here -->
</xsl:template>

</xsl:stylesheet>
Created on , last edited on