client

package
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2020 License: MIT Imports: 8 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// EmptyEmail for not found case
	EmptyEmail = Email{}
)

Functions

This section is empty.

Types

type App

type App interface {
	Enabled() bool
	Send(context.Context, Email) error
}

App of package

func New

func New(config Config) App

New creates new App from Config

type Config

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

Config of package

func Flags

func Flags(fs *flag.FlagSet, prefix string) Config

Flags adds flags for configuring package

type Email

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

Email describes an email to be sent

func NewEmail

func NewEmail() *Email

NewEmail create a new email

func (*Email) As

func (e *Email) As(sender string) *Email

As set sender

func (*Email) Data

func (e *Email) Data(payload interface{}) *Email

Data set payload

func (*Email) From

func (e *Email) From(from string) *Email

From set from

func (*Email) Send

func (e *Email) Send(ctx context.Context, mailer App) error

Send email

func (*Email) Template

func (e *Email) Template(template string) *Email

Template set template

func (*Email) To

func (e *Email) To(recipients ...string) *Email

To add recipients to list

func (*Email) WithSubject

func (e *Email) WithSubject(subject string) *Email

WithSubject set subject

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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