Versions in this module Expand all Collapse all v1 v1.0.1 Dec 18, 2023 Changes in this version + const BASE_64 + const BOUNDARY + const CONTENT_TRANSFER_ENCODING + const CONTENT_TYPE + const DefaultContentType + const MULTIPART + const MaxLineLength + const QUOTED_PRINTABLE + const StrBcc + const StrCc + const StrContentDisposition + const StrDate + const StrFileNameParam + const StrFrom + const StrMessageId + const StrMimeVersion + const StrReplyTo + const StrSubject + const StrTo + var ErrClosed = errors.New("pool closed") + var ErrMissingBoundary = errors.New("no boundary found for multipart entity") + var ErrMissingContentType = errors.New("no Content-Type found for MIME entity") + var ErrMustSpecifyMessage = errors.New("must specify at least one from address and one to address") + var ErrTimeout = errors.New("timed out") + func TpReader(r io.Reader) *textproto.Reader + type Attachment struct + Content []byte + ContentType string + FileName string + HTMLRelated bool + Header textproto.MIMEHeader + type Email struct + Attachments []*Attachment + Bcc []string + Cc []string + From string + Headers textproto.MIMEHeader + Html []byte + ReadReceipt []string + ReplyTo []string + Sender string + Subject string + Text []byte + To []string + func New() *Email + func NewEmailFromReader(r io.Reader) (*Email, error) + func (e *Email) Attach(r io.Reader, fileName string, contentType string) (a *Attachment, err error) + func (e *Email) AttachFile(fileName string) (*Attachment, error) + func (e *Email) AttachWithHeaders(r io.Reader, fileName string, contentType string, headers textproto.MIMEHeader) (a *Attachment, err error) + func (e *Email) Bytes() ([]byte, error) + func (e *Email) Send(addr string, a smtp.Auth) error + func (e *Email) SendWithStartTLS(addr string, auth smtp.Auth, tlsConfig *tls.Config) error + func (e *Email) SendWithTLS(addr string, auth smtp.Auth, tlsConfig *tls.Config) error + type Pool struct + func NewPool(address string, count int, auth smtp.Auth, optTlsConfig ...*tls.Config) (pool *Pool, err error) + func (p *Pool) Close() + func (p *Pool) Send(e *Email, timeout time.Duration) (err error) + func (p *Pool) SetHelloHostname(h string)