mails

package
v0.0.0-...-4b98c26 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 7, 2021 License: AGPL-3.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RenderMail

func RenderMail(ctx *job.WorkerContext, name, layout, locale, recipientName string, templateValues map[string]interface{}) (string, []*mail.Part, error)

RenderMail returns a rendered mail for the given template name with the specified locale, recipient name and template data values.

func SendMail

func SendMail(ctx *job.WorkerContext) error

SendMail is the sendmail worker function.

Types

type MailTemplater

type MailTemplater map[string]subjectEntry

MailTemplater is the list of templates for emails.

func (MailTemplater) Execute

func (m MailTemplater) Execute(ctx *job.WorkerContext, name, layout, locale string, recipientName string, data map[string]interface{}) (string, []*mail.Part, error)

Execute will execute the HTML and text templates for the template with the specified name. It returns the mail parts that should be added to the sent mail.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL