Message templates

In this page you’ll learn how to change the layout of the activation and welcome messages to adapt them to your brand.

The subscription, activation and cancellation processes generate a few emails which body and subject can be customized inside the subscription and cancellation configuration panels.

Usually those messages are:

  1. the activation request message with inside the activation link to verify the email address
  2. the welcome message to confirm the definitive subscription where one can even put the links to premium content, e-books and so on
  3. the cancellation message (goodbye message) sent when the subscription is definitively disabled

You can customized the template used to give a “frame” to those messages in two ways.

messages-template

Set the HTML template

You can directly edit the HTML available on messages template configuration panel under the Settings -> Messages templates section. The HTML rendered can be previewed directly in the configuration panel without send a test email in its desktop and mobile version.

If you mess up the HTML code don’t worry, there is a nice “reset” button which will reload the default template.

The template HTML must contain the tag {message} which will be replace with the actual message (activation, welcome, good bye and so on). With the “test” button, the message is sent to the test subscriber addresses so it can be verified on different email clients.

Since the relevant content of the activation, welcome and goodbye messages is configured in their related panel, your template should only be a “beautifier” of those messages and contain the common parts. You can add a signature, change the font size or background colors.

A designer should be able to provide a more complex design to copy and paste into the template editing area.

Here a screenshot of the template configuration panel.

Create an alternative PHP template

Deprecated and will be removed shortly.

Originally Newsletter executes the “newsletter/subscription/email.php” to generate the final message (of course only if the HTML template is not active). This is a core file that must not be changed.

Follow those steps to create an alternative PHP template:

  1. copy the file “newsletter/subscription/email-alternative.php”  to the folder “wp-content/extensions/newsletter/subscription/email.php” file. Create this folder is missing.
  2. rename the just copied “email-alternative.php” to “email.php”

Never copy the original “email.php” to that folder: it will result in a fatal error every time a subscriber tries to subscribe!

The new file must contain at least the “echo $message” PHP code which render the actual message to be sent. Of course, being a PHP file, modify it with care!