Setu-TS
    Preparing search index...

    Interface MailComponentTemplate

    The component arm of MailTemplate (M102): bodies rendered through the view engine registered under CAPABILITIES.VIEW, with sendTemplate's data passed to each component verbatim as its props.

    Configuring one requires a CAPABILITIES.VIEW provider — MailPlugin refuses at register() otherwise, naming both remedies. Escaping is the rendering runtime's (a JSX component and an html tagged template escape their interpolations; a hand-written template literal does not — the caveat IViewEngine.render states 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 from data renders as undefined rather than throwing. The compile-time route is to call engine.render(Component, props) and mailer.send by hand.

    Component<never> is the one type every component is assignable to; the props are not checked at this boundary because the committed IMailer.sendTemplate types data as Record<string, unknown>.

    0.9.0

    interface MailComponentTemplate {
        html?: undefined;
        text?: Component<never>;
        view: Component<never>;
    }
    Index
    html?: undefined

    Never present on the component arm.

    text?: Component<never>

    Renders 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 &amp; B.

    view: Component<never>

    Renders the HTML body.