mail

package
v0.0.0-...-09de6dd Latest Latest
Warning

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

Go to latest
Published: May 26, 2016 License: MPL-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Mailer

type Mailer interface {
	SendMail([]string, string, string) error
	Close() error
}

Mailer provides the interface for a mailer

type MailerImpl

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

MailerImpl defines a mail transfer agent to use for sending mail

func New

func New(server, port, username, password, from string) MailerImpl

New constructs a Mailer to represent an account on a particular mail transfer agent.

func (*MailerImpl) Close

func (m *MailerImpl) Close() error

Close closes the connection.

func (*MailerImpl) Connect

func (m *MailerImpl) Connect() error

Connect opens a connection to the specified mail server. It must be called before SendMail.

func (*MailerImpl) SendMail

func (m *MailerImpl) SendMail(to []string, subject, msg string) error

SendMail sends an email to the provided list of recipients. The email body is simple text.

Jump to

Keyboard shortcuts

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