Guide

The end-user 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 follows the structure described below.

Basic 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 follow:

  • use simple HTML (i.e.: 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 file name 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 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