Versions in this module Expand all Collapse all v1 v1.1.0 Jul 15, 2024 v1.0.9 Jul 15, 2024 v1.0.8 Jul 15, 2024 v1.0.7 Jul 15, 2024 v1.0.6 Jul 12, 2024 v1.0.5 Jul 12, 2024 v1.0.4 Jul 12, 2024 v1.0.3 Jul 12, 2024 v1.0.2 Jul 12, 2024 Changes in this version + func LoginAuth(username, password, host string) smtp.Auth + func PlainAuth(identity, username, password, host string) smtp.Auth v1.0.1 Jul 12, 2024 v1.0.0 Apr 11, 2016 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