mailer

package
v0.9.4 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EmailSender

type EmailSender interface {
	SendMail(addr string, a smtp.Auth, from string, to []string, msg []byte) error
}

EmailSender is an ad-hoc interface to describe the SendMail function that is in the net/smtp package.

type Mailer

type Mailer interface {
	EmailSender
	LoadSettings(*config.Settings) error
	ConvertAndSend(email []byte) bool
}

Mailer describes an object that is able to send emails via the EmailSender interface, and that can load settings and convert raw email messages into sent mail.

func NewMailer

func NewMailer(s *config.Settings) Mailer

NewMailer returns a Mailer implementation using config.Settings to transmit emails.

Jump to

Keyboard shortcuts

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