Versions in this module Expand all Collapse all v0 v0.0.1 Apr 23, 2020 Changes in this version + var NetDialTimeout = net.DialTimeout + func Send(s Sender, msg ...*Message) error + type Dialer struct + Auth smtp.Auth + Host string + LocalName string + Password string + Port int + RetryFailure bool + SSL bool + StartTLSPolicy StartTLSPolicy + TLSConfig *tls.Config + Timeout time.Duration + 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) AttachReader(name string, r io.Reader, settings ...FileSetting) + func (m *Message) Embed(filename string, settings ...FileSetting) + func (m *Message) EmbedReader(name string, r io.Reader, 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) SetBodyWriter(contentType string, f func(io.Writer) error, settings ...PartSetting) + func (m *Message) SetBoundary(boundary string) + 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 SendError struct + Cause error + Index uint + func (err *SendError) Error() string + 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 + type StartTLSPolicy int + const MandatoryStartTLS + const NoStartTLS + const OpportunisticStartTLS + func (policy *StartTLSPolicy) String() string + type StartTLSUnsupportedError struct + Policy StartTLSPolicy + func (e StartTLSUnsupportedError) Error() string