Skip to content

MailPreview ​

Both rendered bodies for a template, returned by PreviewAsync without sending anything.

Writing them to a file is left to the caller, so the package takes on no path validation or overwrite semantics.

Fields

Html: string
The rendered HTML body, exactly as it would be sent.

Text: string
The rendered plain-text body, for clients that do not display HTML.

Type signature ​

csharp
public sealed record MailPreview
{
    public required string Html { get; init; }
    public required string Text { get; init; }
}

All packages are released under the MIT License.