By default, email notifications are plaintext. Libraries may request their email notification templates be updated to HTML, so that messages can contain formatting (e.g. bold text, links). All notifications from a given library should be in the same format (that is, all plaintext or all using HTML) for consistency.
When a template is updated, its name should be changed to add - HTML as a suffix, and the hyphen should not touch the text (a space before and after it, - HTML rather than -HTML), and "HTML" should be written in all caps. This way, filtering by title anything that Contains HTML should retrieve all templates updated to HTML. For example, ZSP - 3 Day Courtesy Notice - HTML
If the following code is included, notices will be sent as HTML:
This is as oppossed to the default code which indicates the template is plaintext:
Note that all template content must be updated to HTML, otherwise the text will not present correctly.
For example, line breaks need to be coded in (i.e. <br />), otherwise the text will be all stuck together on the same line.
Another issue is that hyperlinks will no longer automatically link unless they are updated with HTML, <a href="URL">linked text</a>
Here is a reference of HTML text content elements.
Tags known to work in action triggers include:
A div tag may be used to enclose the entire content of the template’s message. Here is an example:
<div>***This is an automated message. Please do not reply to this email.***<br /><br />
Dear [% user.pref_first_given_name || user.first_given_name %] [% user.pref_family_name || user.family_name %],<br /><br />
Our records indicate your library account is due to expire in 30 days. Please visit, call or email your local library at your convenience to renew your account in order to avoid a disruption in access to library service. <br /><br />
Sincerely,<br /> [% lib.name %]<br /><br />
Contact your library for more information:<br /><br /> [% lib.name %]<br /> [%- SET addr = lib.mailing_address -%]<br /> [%- IF !addr -%] [%- SET addr = lib.billing_address -%] [%- END %]<br /> [% addr.street1 %] [% addr.street2 %]<br /> [% addr.city %], [% addr.state %]<br /> [% addr.post_code %]<br /> [% lib.phone %]<br /> [% lib.email %]<br /><br />
If you no longer wish to receive these email notifications, you may login to your library account and change your preferences or contact your library for assistance.<br /></div>
Numeric character references must be used for some characters.
For example, if a library has notification templates using HTML and wants "Come to the library & check out books!" to appear in a template, this is how the text should be formatted in the template:
Come to the library & check out books!