mailer

package
v0.0.0-...-185ace6 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2021 License: MIT Imports: 10 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 {
	// ValidateEmail returns nil if the email is valid, otherwise an error
	// indicating the reason it is invalid.
	ValidateEmail(email string) error

	// Send can be used to send one-off emails to users.
	Send(user *user.User, subject, body string, data map[string]interface{}) error

	// ConfirmationMail sends a signup confirmation mail to a new user.
	ConfirmationMail(user *user.User, referrerURL string) error

	// RecoveryMail sends a password recovery mail.
	RecoveryMail(user *user.User, referrerURL string) error

	// EmailChangeMail sends an email change confirmation mail to a user.
	EmailChangeMail(user *user.User, referrerURL string) error
}

Mailer defines the interface a mailer must implement.

func NewMailer

func NewMailer(log logger.Logger, config *config.Config) Mailer

NewMailer returns a new mailer.

Jump to

Keyboard shortcuts

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