Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Mail

type Mail struct {
	From    string
	Subject string
	Text    string
	To      []string
}

Mail contains all data needed to send an e-mail.

type Mailgun

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

Mailgun implements Sender interface.

func NewMailgun

func NewMailgun(mg mailgun.Mailgun) *Mailgun

NewMailgun creates new Mailgun.

func (*Mailgun) Send

func (m *Mailgun) Send(ctx context.Context, message *Mail) (*Response, error)

Send implements Sender interface.

type Response

type Response struct {
	Message string
	ID      string
}

Response contains data returned by mail service.

type Sender

type Sender interface {
	Send(context.Context, *Mail) (*Response, error)
}

Sender is an interface to send e-mails.