OptionalhtmlNever present on the component arm.
OptionaltextRenders the plain-text body, used verbatim — so write it as a plain
(props) => string function, whose output the engine returns unchanged.
A text component written with the html tag or JSX is HTML-escaped by its
rendering runtime like any other, which puts entities into a plain-text
mail: Hi ${name} with name = 'A & B' arrives as Hi A & B.
Renders the HTML body.
The component arm of
MailTemplate(M102): bodies rendered through the view engine registered underCAPABILITIES.VIEW, withsendTemplate'sdatapassed to each component verbatim as its props.Configuring one requires a
CAPABILITIES.VIEWprovider —MailPluginrefuses atregister()otherwise, naming both remedies. Escaping is the rendering runtime's (a JSX component and anhtmltagged template escape their interpolations; a hand-written template literal does not — the caveatIViewEngine.renderstates applies unchanged to a mail body). Unlike the string arm, there is NO missing-key check: a component reads whatever it reads, so a key absent fromdatarenders asundefinedrather than throwing. The compile-time route is to callengine.render(Component, props)andmailer.sendby hand.Component<never>is the one type every component is assignable to; the props are not checked at this boundary because the committedIMailer.sendTemplatetypesdataasRecord<string, unknown>.Since
0.9.0