mails

package
v0.0.0-...-a7c217f Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: AGPL-3.0 Imports: 20 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RenderMail

func RenderMail(ctx *job.TaskContext, 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.TaskContext) 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.TaskContext, 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