Versions in this module Expand all Collapse all v1 v1.0.1 Oct 15, 2020 v1.0.0 Jun 18, 2020 Changes in this version + func Send(s Sender, msg ...*Message) error + type Dialer struct + Auth smtp.Auth + Host string + LocalName string + Password string + Port int + SSL bool + TLSConfig *tls.Config + Username string + func NewDialer(host string, port int, username, password string) *Dialer + func NewPlainDialer(host string, port int, username, password string) *Dialer + func (d *Dialer) Dial() (SendCloser, error) + func (d *Dialer) DialAndSend(m ...*Message) error + type Encoding string + const Base64 + const QuotedPrintable + const Unencoded + type FileSetting func(*file) + func Rename(name string) FileSetting + func SetCopyFunc(f func(io.Writer) error) FileSetting + func SetHeader(h map[string][]string) FileSetting + type Message struct + func NewMessage(settings ...MessageSetting) *Message + func (m *Message) AddAlternative(contentType, body string, settings ...PartSetting) + func (m *Message) AddAlternativeWriter(contentType string, f func(io.Writer) error, settings ...PartSetting) + func (m *Message) Attach(filename string, settings ...FileSetting) + func (m *Message) Embed(filename string, settings ...FileSetting) + func (m *Message) FormatAddress(address, name string) string + func (m *Message) FormatDate(date time.Time) string + func (m *Message) GetHeader(field string) []string + func (m *Message) Reset() + func (m *Message) SetAddressHeader(field, address, name string) + func (m *Message) SetBody(contentType, body string, settings ...PartSetting) + func (m *Message) SetDateHeader(field string, date time.Time) + func (m *Message) SetHeader(field string, value ...string) + func (m *Message) SetHeaders(h map[string][]string) + func (m *Message) WriteTo(w io.Writer) (int64, error) + type MessageSetting func(m *Message) + func SetCharset(charset string) MessageSetting + func SetEncoding(enc Encoding) MessageSetting + type PartSetting func(*part) + func SetPartEncoding(e Encoding) PartSetting + type SendCloser interface + Close func() error + type SendFunc func(from string, to []string, msg io.WriterTo) error + func (f SendFunc) Send(from string, to []string, msg io.WriterTo) error + type Sender interface + Send func(from string, to []string, msg io.WriterTo) error