email

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2016 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package email enables interaction with arbitrary email providers. It implements a standardized interface through which Mailgun and more may be supported. It's up to individual drivers to add support for each of these services.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Drivers

func Drivers() []string

Drivers returns a sorted list of the names of the registered drivers.

func Register

func Register(name string, driver driver.Driver)

Register makes a email driver available by the provided name. If Register is called twice with the same name or if driver is nill, it panics.

Types

type Conn

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

Conn is a connection to a specific email driver.

func Open

func Open(driverName string, r *httprouter.Router) (*Conn, error)

Open a connection to a registered driver.

func (*Conn) Driver

func (c *Conn) Driver() driver.Driver

Driver returns the driver used by a connection.

func (*Conn) SendHTML

func (c *Conn) SendHTML(to []string, from, subj, html string) error

SendHTML email through the opened driver connection.

func (*Conn) SendPlainText

func (c *Conn) SendPlainText(to []string, from, subj, plaintext string) error

SendPlainText email through the opened driver connection.

Directories

Path Synopsis
Package driver defines interfaces to be implemented by email drivers as used by package email.
Package driver defines interfaces to be implemented by email drivers as used by package email.

Jump to

Keyboard shortcuts

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