email

package
v0.0.0-...-605cf97 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2017 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ContentLoginToken

type ContentLoginToken struct {
	Email  string
	Name   string
	URL    string
	Token  string
	Expiry time.Time
}

ContentLoginToken defines content for login token email template.

type Email

type Email struct {
	Name    string
	Address string
}

Email struct holds email address and recipient name.

func NewEmail

func NewEmail(name string, address string) *Email

NewEmail returns an email address.

type Mailer

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

Mailer is a SMTP mailer.

func NewMailer

func NewMailer() (*Mailer, error)

NewMailer returns a configured SMTP Mailer.

func (*Mailer) LoginToken

func (m *Mailer) LoginToken(name, address string, content ContentLoginToken) error

LoginToken creates and sends a login token email with provided template content.

func (*Mailer) Send

func (m *Mailer) Send(mail *message) error

Send parses the corrsponding template and sends the mail via smtp.

Jump to

Keyboard shortcuts

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