mailer

package
v0.0.0-...-f46f3e0 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2022 License: MIT Imports: 6 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 struct {
	// contains filtered or unexported fields
}

Interface between the server and the service it uses to send emails.

func New

func New(config *config.Config) *Mailer

Creates and initializes a new Mailer based on the specified config.

func (*Mailer) Send

func (mailer *Mailer) Send(options SendOptions) error

Sends an email with the specified contents to the specified email address.

type SendOptions

type SendOptions struct {
	// Body of the email to be sent.
	Message string
	// Subject of the email to be sent.
	Subject string
	// Email address of the receipient of the email to be sent.
	ToEmailAddress string
}

Options configuring Mailer#Send(...).

Jump to

Keyboard shortcuts

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