Versions in this module Expand all Collapse all v1 v1.0.0 Sep 24, 2024 Changes in this version + const ContentTypeHTML + const ContentTypeMultipartAlt + const ContentTypeMultipartMixed + const ContentTypeMultipartRelated + const ContentTypeOctetStream + const ContentTypePlain + const HdrBCC + const HdrCC + const HdrContentDisposition + const HdrContentID + const HdrContentTransferEncoding + const HdrContentType + const HdrDate + const HdrFrom + const HdrMessageID + const HdrMimeVersion + const HdrReplyTo + const HdrSubject + const HdrTo + const MaxLineLength + var ErrMissingBoundary = errors.New("No boundary found for multipart entity") + var ErrMissingContentType = errors.New("No Content-Type found for MIME entity") + var ErrPoolClosed = errors.New("pool closed") + type Attachment struct + Content []byte + Filename string + HTMLRelated bool + Header textproto.MIMEHeader + type Email struct + Attachments []Attachment + Bcc []string + Cc []string + From string + HTML []byte + Headers textproto.MIMEHeader + ReadReceipt []string + ReplyTo []string + Sender string + Subject string + Text []byte + To []string + func NewEmailFromReader(r io.Reader) (Email, error) + func (e *Email) Attach(r io.Reader, filename string, c string) (a Attachment, err error) + func (e *Email) AttachFile(filename string) (a Attachment, err error) + func (e *Email) Bytes() ([]byte, error) + type LoginAuth struct + Password string + Username string + func (a *LoginAuth) Next(fromServer []byte, more bool) ([]byte, error) + func (a *LoginAuth) Start(server *smtp.ServerInfo) (string, []byte, error) + type Opt struct + Auth smtp.Auth + HelloHostname string + Host string + IdleTimeout time.Duration + MaxConns int + MaxMessageRetries int + PoolWaitTimeout time.Duration + Port int + SSL bool + TLSConfig *tls.Config + type Pool struct + func New(o Opt) (*Pool, error) + func (p *Pool) Close() + func (p *Pool) Send(e Email) (string, error)