Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func QP_Encode ¶
Quoted-Printable encoding, http://en.wikipedia.org/wiki/Quoted-printable
func Q_Encode ¶
The "Q" endcoding for message headers, defined in RFC2047 http://tools.ietf.org/html/rfc2047#section-4.2
Types ¶
type MIMEAlternative ¶
type MIMEAlternative struct {
// contains filtered or unexported fields
}
The multipart/alternative subtype indicates that each part is an "alternative" version of the same (or similar) content. The formats are ordered by how faithful they are to the original, with the least faithful first and the most faithful last. Most commonly, multipart/alternative is used for email with two parts, one plain text (text/plain) and one HTML (text/html).
func (MIMEAlternative) ContentTransferEncoding ¶
func (m MIMEAlternative) ContentTransferEncoding() string
func (MIMEAlternative) ContentType ¶
func (m MIMEAlternative) ContentType() string
func (MIMEAlternative) EncodedBody ¶
func (m MIMEAlternative) EncodedBody() []byte
func (*MIMEAlternative) InitBoundary ¶
func (m *MIMEAlternative) InitBoundary()
type MIMEBinary ¶
Basic binary data
func (MIMEBinary) ContentTransferEncoding ¶
func (b MIMEBinary) ContentTransferEncoding() string
func (MIMEBinary) ContentType ¶
func (b MIMEBinary) ContentType() string
func (MIMEBinary) EncodedBody ¶
func (b MIMEBinary) EncodedBody() []byte
func (MIMEBinary) Headers ¶
func (b MIMEBinary) Headers() map[string]string
type MIMEHTML ¶
type MIMEHTML string
Basic text/html
func (MIMEHTML) ContentTransferEncoding ¶
func (MIMEHTML) ContentType ¶
func (MIMEHTML) EncodedBody ¶
type MIMEMixed ¶
type MIMEMixed struct {
// contains filtered or unexported fields
}
Multipart/mixed is used for sending files with different "Content-Type" headers inline, or as attachments.
func (MIMEMixed) ContentTransferEncoding ¶
func (m MIMEMixed) ContentTransferEncoding() string
func (MIMEMixed) ContentType ¶
func (MIMEMixed) EncodedBody ¶
func (m MIMEMixed) EncodedBody() []byte
func (*MIMEMixed) InitBoundary ¶
func (m *MIMEMixed) InitBoundary()
type MIMEPart ¶
type MIMEPart interface { ContentType() string ContentTransferEncoding() string EncodedBody() []byte Headers() map[string]string }
Basic MIME part, implmeneted by all subtypes
type MIMEPlain ¶
type MIMEPlain string
Basic text/plain
func (MIMEPlain) ContentTransferEncoding ¶
func (MIMEPlain) ContentType ¶
func (MIMEPlain) EncodedBody ¶
type MIMERelated ¶
type MIMERelated struct {
// contains filtered or unexported fields
}
Each message part is a component of an aggregate whole. The message consists of a root part which reference other parts inline. Message parts are commonly referenced by the "Content-ID" part header. One common usage of this subtype is to send a web page complete with images, in a single message. The root part would contain the HTML document, and use image tags to reference images stored in the latter parts.
func (MIMERelated) ContentTransferEncoding ¶
func (m MIMERelated) ContentTransferEncoding() string
func (MIMERelated) ContentType ¶
func (m MIMERelated) ContentType() string
func (MIMERelated) EncodedBody ¶
func (m MIMERelated) EncodedBody() []byte
func (*MIMERelated) InitBoundary ¶
func (m *MIMERelated) InitBoundary()
type Message ¶
type Message struct { From Address To []Address Subject string Content MIMEPart CC []Address BCC []Address Headers map[string]string }
func (*Message) AllRecipients ¶
func (*Message) Send ¶
func (m *Message) Send(config SMTPConfig) error
type SMTPConfig ¶
type SMTPConfig struct {
Username, Password, Server, Port string
}
func (SMTPConfig) GetSMTPAuth ¶
func (config SMTPConfig) GetSMTPAuth() smtp.Auth