mail

package
v0.0.0-...-9d4acdc Latest Latest
Warning

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

Go to latest
Published: May 25, 2022 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Mailer

type Mailer interface {
	Send(message *gomail.Message) error
}

func NewMailer

func NewMailer(config config.SMTP) (Mailer, error)

type Renderer

type Renderer struct {
	// contains filtered or unexported fields
}

func NewRenderer

func NewRenderer() (*Renderer, error)

NewRenderer creates an instance of Renderer, which renders the templates (located in mail/templates) with locales (located in mail/locales)

func (*Renderer) Render

func (r *Renderer) Render(templateName string, lang string, data map[string]interface{}) (string, error)

Render renders a template with the given data and lang. The lang can be the contents of Accept-Language headers as defined in http://www.ietf.org/rfc/rfc2616.txt.

func (*Renderer) Translate

func (r *Renderer) Translate(lang string, messageID string, data map[string]interface{}) string

Jump to

Keyboard shortcuts

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