Versions in this module Expand all Collapse all v3 v3.0.1 Jan 10, 2024 Changes in this version + const MaxLineLength + var ErrMissingBoundary = errors.New("No boundary found for multipart entity") + var ErrMissingContentType = errors.New("No Content-Type found for MIME entity") + 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 + HTML []byte + Headers textproto.MIMEHeader + ReadReceipt []string + ReplyTo []string + Sender string + Subject string + Text []byte + To []string + func NewEmail() *Email + 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) + func (e *Email) Send(addr string, a smtp.Auth) error + func (e *Email) SendWithStartTLS(addr string, a smtp.Auth, t *tls.Config) error + func (e *Email) SendWithTLS(addr string, a smtp.Auth, t *tls.Config) error