Documentation ¶
Overview ¶
Package email provides an easy to use and hard to misuse email API
Index ¶
Constants ¶
View Source
const (
// MaxLineLength is the maximum line length per RFC 2045
MaxLineLength = 76
)
Variables ¶
View Source
var ErrMissingBoundary = errors.New("No boundary found for multipart entity")
ErrMissingBoundary is returned when there is no boundary given for a multipart entity
View Source
var ErrMissingContentType = errors.New("No Content-Type found for MIME entity")
ErrMissingContentType is returned when there is no "Content-Type" header for a MIME entity
Functions ¶
func InitDefaultMailer ¶
func InitDefaultMailer(config SMTPConfig)
Types ¶
type Attachment ¶
type Attachment struct { Filename string Header textproto.MIMEHeader Content []byte }
Attachment is an email attachment. Based on the mime/multipart.FileHeader struct, Attachment contains the name, MIMEHeader, and content of the attachment in question
type Email ¶
type Email struct { ReplyTo []*mail.Address From *mail.Address To []*mail.Address Bcc []*mail.Address Cc []*mail.Address Subject string Text []byte // Plaintext message HTML []byte // Html message Headers textproto.MIMEHeader Attachments []Attachment }
Email is an email... either Text or HTML must be provided
Click to show internal directories.
Click to hide internal directories.