email

package
v0.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2016 License: MPL-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Email

type Email struct {
	Address string
	Name    string
}

Email represents an email address with a name

func (*Email) Format

func (e *Email) Format() (string, error)

Format returns a properly formatted email address

type Message

type Message struct {
	Subject    string
	Recipients []*Recipient
	From       *Sender
	Text       string
	HTML       string
}

Message represents an email message

type Recipient

type Recipient struct {
	Email
}

Recipient represents a single email recipient

type Sender

type Sender struct {
	Email
}

Sender represents an email sender

type Service

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

Service struct keeps config object to avoid passing it around

func NewService

func NewService(cnf *config.Config) *Service

NewService starts a new Service instance

func (*Service) Send

func (s *Service) Send(m *Message) error

Send sends email using sendgrid

type ServiceInterface

type ServiceInterface interface {
	Send(m *Message) error
}

ServiceInterface defines exported methods

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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