driver

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: 1 Imported by: 3

Documentation

Overview

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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Conn

type Conn interface {
	// SendHTML email through the opened driver connection.
	SendHTML(to []string, from, subj, html string) error

	// SendPlainText email through the opened driver connection.
	SendPlainText(to []string, from, subj, plaintext string) error

	// Close the connection.
	Close() error
}

Conn is a connection to the external email service.

type Driver

type Driver interface {
	// Open returns a new connection to the email server. Authentication is
	// handled by the individual drivers.
	Open(r *httprouter.Router) (Conn, error)
}

Driver is the interface that must be implemented by an email driver.

type Email

type Email interface {
	// From is the sending email address.
	From() string

	// Content is the body of the message.
	Content() string
}

Email defines an interface with basic getters to interact with an email message.

Jump to

Keyboard shortcuts

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