smtp

package
v0.18.0 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2019 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AgnosticAuth added in v0.17.0

func AgnosticAuth(identity, username, password, host string) gosmtp.Auth

AgnosticAuth returns an Auth that match the correct authentication thanks to gosmtp.ServerInfo

func LoginAuth added in v0.17.0

func LoginAuth(username, password string) gosmtp.Auth

LoginAuth returns an Auth that implements the LOGIN authentication mechanism as defined in Internet-Draft draft-murchison-sasl-login-00. The LOGIN mechanism is still used by some SMTP server.

Types

type Sender

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

Sender is used to send emails

func NewSender

func NewSender(logger log.Logger, host, port, username, password string) *Sender

NewSender creates a new mailgun email sender

func (*Sender) BatchSend added in v0.10.0

func (s *Sender) BatchSend(ctx email.Context, templateName string, params email.Params, from string, to []email.Recipient) error

BatchSend an email to multiple recipients

func (*Sender) ReplaceSend added in v0.14.0

func (s *Sender) ReplaceSend(send func(string, string, gosmtp.Auth, string, []string, []byte) error)

ReplaceSend can be used to mock internal send function

func (*Sender) Send

func (s *Sender) Send(ctx email.Context, templateName string, params email.Params, from string, to email.Recipient) error

Send an email

Jump to

Keyboard shortcuts

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