Documentation
¶
Index ¶
Constants ¶
const CR = "\r"
CR represents a ASCII CR
const CRLF = CR + LF
CRLF represents a ASCII CR+LF
const LF = "\n"
LF represents a ASCII LR
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Boundary ¶
type Boundary struct { Identifier string // contains filtered or unexported fields }
Boundary represents a multipart boundary
func NewBoundary ¶
NewBoundary starts a new multipart context and generates a new boundary. The headers are written to the given io.Writer.
type Encoding ¶
type Encoding string
Encoding represents a MIME encoding scheme like quoted-printable or base64.
const ( // QuotedPrintable represents the quoted-printable encoding as defined in // RFC 2045. QuotedPrintable Encoding = "quoted-printable" // Base64 represents the base64 encoding as defined in RFC 2045. Base64 Encoding = "base64" // Unencoded can be used to avoid encoding the body of an email. The headers // will still be encoded using quoted-printable encoding. Unencoded Encoding = "8bit" )
type Envelope ¶
type Envelope struct { Date time.Time // RFC 4021 2.1.1 From string // RFC 4021 2.1.2 Sender string // RFC 4021 2.1.3 ReplyTo string // RFC 4021 2.1.4 To []string // RFC 4021 2.1.5 Cc []string // RFC 4021 2.1.6 Subject string // RFC 4021 2.1.11 Parts []*Part // RFC 1341 7.2 Embedded []*File // RFC 2387 Attachments []*File // RFC 1341 7.2 Charset string }
Envelope is responsible for the generation of RFC 822-style emails. Specifications mentioned: - RFC 2822 - Internet Message Format - RFC 2387 - The MIME Multipart/Related Content-type - RFC 1341 - MIME (Multipurpose Internet Mail Extensions) - RFC 4021 - Registration of Mail and MIME Header Fields
func (*Envelope) Write ¶
func (e *Envelope) Write(writer io.WriteCloser)
Write writes the smtp message as multiform to the given io.Writer