mail

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

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

Config holds configuration options for the service.

type ConfigOption

type ConfigOption func(*service)

ConfigOption configures the service.

func WithConfig

func WithConfig(config Config) ConfigOption

WithConfig configures the service with a Config.

func WithDefaults

func WithDefaults(serverAddr, fromAddr string, auth smtp.Auth) ConfigOption

WithDefaults configures the service with a default mailer (net/smtp)

type Emailer

type Emailer interface {
	Email(ctx context.Context, email string, message string) error
}

Emailer exposes an API to send email messages.

func NewService

func NewService(configuration ConfigOption) Emailer

NewService returns a new mailing service.

Jump to

Keyboard shortcuts

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