Static ReadonlyBUILT_The built-in template of every message, in English: its id, category, title, placeholders, links and three parts.
Static ReadonlyCATEGORIESThe message categories (security, account, notification), with
whether a person may decline each.
Static ReadonlyCOMMONThe placeholders every message offers: realm and service.
Static ReadonlyLAYOUT_The id of the layout every message is wrapped in: layout.
StaticbuiltFinds the built-in template with an id.
the message's id
the template, or null
StaticcategoryFinds a category by id.
the category's id
the category, or null
StatichtmlWraps an HTML part in the one document every message is: a language tag and a head that loads nothing.
the HTML part
the language tag; en when absent
the document
StaticlanguageOrders the languages to try for a message, best first: each tag of an
Accept-Language value and its primary subtag by q, then the realm's
default, then en.
the entry's preferredLanguage
the realm's default language
the language tags
StaticplaceholdersLists every {{name}} placeholder in a piece of text, once each.
the text
the placeholder names
StaticplainPrepares a value for a subject or a text part: every control character, CR and LF above all, becomes a space.
the value
the text
StaticproblemChecks a realm's template against the rules, when it is saved: all three parts, sizes, placeholders the message offers, no address of its own, every link in the text part, and no HTML that loads or runs anything.
the built-in template it rewords
{ subject, text, html }
one sentence saying what is wrong, or '' when nothing is
StaticrenderRenders a template: each placeholder filled with its value, escaped for HTML in the HTML part and stripped of control characters elsewhere. A placeholder with no value renders empty.
the template's { subject, text, html }
every placeholder's raw value, links already absolute
{ subject, text, html }
StaticwrapWraps a rendered message in the layout: its body as {{content}},
unescaped since it was escaped when rendered, and its subject as
{{subject}}.
the layout's { subject, text, html }
render()'s answer for the message
the other placeholders' values
{ subject, text, html }
The mail channel's messages: the built-in template of every message this service sends, the rules a realm's own template must keep, and the renderer.
Values are escaped by the renderer, a link is always a placeholder for this service's own address, and the HTML part may load and run nothing. A library that stores nothing.