Versions in this module Expand all Collapse all v0 v0.0.3 Sep 25, 2018 v0.0.2 Sep 21, 2018 v0.0.1 Apr 10, 2018 Changes in this version + var ErrPipeStopped = errors.New("email streaming pipe stopped") + func NewEmailPipe(conf ...Config) chan<- Email + type Builder struct + From string + Subject string + To string + func (b *Builder) AddAttachment(file ...string) error + func (b *Builder) AddHTMLFunc(f func(io.Writer) error, file ...string) error + func (b *Builder) AddHeader(headers ...string) + func (b *Builder) AddReplyTo(name, email string) + func (b *Builder) AddSubjectFunc(f func(io.Writer) error) + func (b *Builder) AddTextFunc(f func(io.Writer) error) + func (b *Builder) AddTextHTML(html []byte, file ...string) (err error) + func (b *Builder) AddTextPlain(text []byte) + func (b *Builder) Email(id string, resultFunc func(Result)) Email + func (b *Builder) SetDKIM(domain, selector string, privateKey []byte) + func (b *Builder) SetFrom(name, email string) + func (b *Builder) SetSubject(text string) + func (b *Builder) SetTo(name, email string) + type Config struct + Hostname string + Iface string + MapIP map[string]string + Port int + SMTPserver *SMTPserver + Stream int + type Connect struct + func (c *Connect) SetHostName(name string) + func (c *Connect) SetIface(iface string) + func (c *Connect) SetMapIP(localIP, globalIP string) + func (c *Connect) SetSMTPport(port int) + type Email struct + From string + ID string + ResultFunc func(Result) + To string + WriteCloser func(io.WriteCloser) error + func (e *Email) Send(connect *Connect, server *SMTPserver) + type Pipe struct + func NewPipe(conf ...Config) Pipe + func (pipe *Pipe) Send(email Email) (err error) + func (pipe *Pipe) Start() + func (pipe *Pipe) Stop() + type Result struct + Duration time.Duration + Err error + ID string + type SMTPserver struct + Host string + Password string + Port int + Username string