Versions in this module Expand all Collapse all v0 v0.4.0 May 4, 2026 Changes in this version + var ErrCSSInliningFailed = errors.New("css inlining failed") + var ErrPlainTextConversionFailed = errors.New("plain text conversion failed") + var ErrTemplateExecutionFailed = errors.New("template execution failed") + var ErrTemplateParsingFailed = errors.New("template parsing failed") + var ErrThemeRequired = errors.New("theme is required") + func Bold(s string) template.HTML + func ExecuteTextTemplate(name, tmplStr string, data map[string]any) (string, error) + func HTMLToPlainText(html string) (string, error) + func InlineCSS(html string) (string, error) + func Link(href, text string) template.HTML + func LinkWithColor(href, text, color string) template.HTML + type Action struct + Button Button + Instructions string + InviteCode string + Style Style + type Button struct + Color string + Link string + Style Style + Text string + TextColor string + type Callout struct + Items []template.HTML + Ordered bool + Style Style + Title string + type Cell struct + Key string + UnsafeValue template.HTML + Value string + type ContentBody struct + Actions []Action + AdditionalCSS string + BodyWidth string + Callout *Callout + ContentBlocks []template.HTML + Dictionary Dictionary + FreeMarkdown MarkdownContent + Greeting string + Header HeaderBlock + Icon *ContentIcon + Intros IntrosBlock + Name string + Outros OutrosBlock + Preheader string + Signature string + SignatureName string + Style Style + Tables []DataTable + Title string + type ContentIcon struct + Alt string + Src string + type DataTable struct + Class string + Columns TableColumns + Data [][]Cell + Footer string + FooterUnsafe template.HTML + Style Style + Title string + TitleUnsafe template.HTML + type Dictionary struct + Cells []Cell + Style Style + type EmailContent struct + Body ContentBody + Config any + Request any + type HeaderBlock struct + Logo *ContentIcon + Style Style + type IntrosBlock struct + Markdown MarkdownContent + Paragraphs []string + Style Style + Unsafe []template.HTML + type MarkdownContent template.HTML + func (m MarkdownContent) ToHTML() template.HTML + type OutrosBlock struct + Markdown MarkdownContent + Paragraphs []string + Style Style + Unsafe []template.HTML + type Renderer struct + func NewRenderer(opts ...RendererOption) *Renderer + func (r *Renderer) GenerateHTML(content EmailContent) (string, error) + func (r *Renderer) GeneratePlainText(content EmailContent) (string, error) + type RendererOption func(*Renderer) + func WithTheme(t *Theme) RendererOption + type Style struct + BackgroundColor string + ButtonColor string + ButtonTextColor string + FontFamily string + LinkColor string + PrimaryColor string + SecondaryColor string + TextColor string + type TableColumns struct + CustomAlignment map[string]string + CustomWidth map[string]string + type Theme struct + HTML string + Name string + Text string