Documentation
¶
Index ¶
- type Content
- type ContentHeaders
- func (headers *ContentHeaders) All() map[string][]string
- func (headers *ContentHeaders) DateUTC() (time.Time, error)
- func (headers *ContentHeaders) From() (EmailInfo, error)
- func (headers *ContentHeaders) Get(key string) ([]string, error)
- func (headers *ContentHeaders) GetOne(key string) (string, error)
- func (headers *ContentHeaders) Has(key string) bool
- func (headers *ContentHeaders) Set(key string, val []string) *ContentHeaders
- func (headers *ContentHeaders) To() []EmailInfo
- type EmailInfo
- type MIMEBody
- type Message
- type MessageID
- type Path
- type SMTPMessage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Content ¶
type Content struct {
Headers ContentHeaders
Body string
Size int
MIME *MIMEBody
}
Content represents the body content of an SMTP message
func ContentFromString ¶
ContentFromString parses SMTP content into separate headers and body
type ContentHeaders ¶
type ContentHeaders struct {
// contains filtered or unexported fields
}
func (*ContentHeaders) All ¶
func (headers *ContentHeaders) All() map[string][]string
func (*ContentHeaders) From ¶
func (headers *ContentHeaders) From() (EmailInfo, error)
func (*ContentHeaders) Has ¶
func (headers *ContentHeaders) Has(key string) bool
func (*ContentHeaders) Set ¶
func (headers *ContentHeaders) Set(key string, val []string) *ContentHeaders
func (*ContentHeaders) To ¶
func (headers *ContentHeaders) To() []EmailInfo
type MIMEBody ¶
type MIMEBody struct {
Parts []*Content
}
MIMEBody represents a collection of MIME parts
type Message ¶
type Message struct {
ID MessageID
From *Path
To []*Path
Content *Content
Created time.Time
Raw *SMTPMessage
}
Message represents a parsed SMTP message
type MessageID ¶
type MessageID string
MessageID represents the ID of an SMTP message including the hostname part
type Path ¶
Path represents an SMTP forward-path or return-path
func PathFromString ¶
PathFromString parses a forward-path or reverse-path into its parts
type SMTPMessage ¶
SMTPMessage represents a raw SMTP message
func FromBytes ¶
func FromBytes(b []byte) *SMTPMessage
FromBytes returns a SMTPMessage from raw message bytes (as output by SMTPMessage.Bytes())
func (*SMTPMessage) Bytes ¶
func (message *SMTPMessage) Bytes() io.Reader
Bytes returns an io.Reader containing the raw message data
func (*SMTPMessage) Parse ¶
func (message *SMTPMessage) Parse() *Message
Parse converts a raw SMTP message to a parsed MIME message