mailer

package
v0.0.0-...-7438d6a Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2015 License: AGPL-3.0 Imports: 29 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 struct {
	Options *Options

	Log       *logrus.Logger
	Rethink   *r.Session
	Producer  *nsq.Producer
	Consumer  *nsq.Consumer
	Raven     *raven.Client
	Spam      *spamc.Client
	TLSConfig *tls.Config
}

func NewMailer

func NewMailer(options *Options) *Mailer

func (*Mailer) Error

func (m *Mailer) Error(conn *smtpd.Connection, err error)

func (*Mailer) Exit

func (m *Mailer) Exit()

func (*Mailer) HandleDelivery

func (m *Mailer) HandleDelivery(next func(conn *smtpd.Connection)) func(conn *smtpd.Connection)

func (*Mailer) HandleRecipient

func (m *Mailer) HandleRecipient(next func(conn *smtpd.Connection)) func(conn *smtpd.Connection)

func (*Mailer) Main

func (m *Mailer) Main()

func (*Mailer) Wrap

func (m *Mailer) Wrap(x func()) func()

type Options

type Options struct {
	LogLevel          logrus.Level
	RethinkOpts       r.ConnectOpts
	NSQdAddress       string
	LookupdAddress    string
	SenderConcurrency int
	SpamdAddress      string
	RavenDSN          string
	SMTPTLSCert       string
	SMTPTLSKey        string
	Hostname          string
	WelcomeMessage    string
	ReadTimeout       int
	WriteTimeout      int
	DataTimeout       int
	MaxConnections    int
	MaxMessageSize    int
	MaxRecipients     int
	SMTPAddress       string
	SMTPDAddress      string
}

func NewOptions

func NewOptions(fs *flag.FlagSet) (*Options, error)

Jump to

Keyboard shortcuts

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