emailsender

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2016 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package emailsender enables Abot to send email through any external service. It implements a standardized interface through which Sendgrid and more can be supported. It's up to individual drivers to add support for each of these email sending services. To both send and receive emails, use interface/email instead.

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 emailsender driver.

func Open

func Open(driverName, auth string) (*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_sender drivers as used by package emailsender.
Package driver defines interfaces to be implemented by email_sender drivers as used by package emailsender.

Jump to

Keyboard shortcuts

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