Documentation ¶
Overview ¶
Package mail implements a parser for electronic mail messages as specified in RFC5322.
We allow both CRLF and LF to be used in the input, possibly mixed.
Index ¶
- func ParseDate(s string) time.Time
- type Address
- type Attachment
- type DecodedAddress
- type GroupAddr
- type Header
- type HeaderInfo
- type HeaderList
- func (h HeaderList) Add(key, value string)
- func (h HeaderList) Bcc() []Address
- func (h HeaderList) Cc() []Address
- func (h HeaderList) Comments() []string
- func (h HeaderList) ContentType() string
- func (h HeaderList) Date() time.Time
- func (h HeaderList) FirstByKey(key string) (string, bool)
- func (h HeaderList) From() []Address
- func (h HeaderList) InReply() []string
- func (h HeaderList) Keywords() []string
- func (h HeaderList) MediaType() MediaType
- func (h HeaderList) MessageId() string
- func (h HeaderList) References() []string
- func (h HeaderList) ReplyTo() []Address
- func (h HeaderList) Sender() Address
- func (h HeaderList) Set(key string, value []string)
- func (h HeaderList) Subject() string
- func (h HeaderList) To() []Address
- type MailboxAddr
- type MediaType
- type Message
- type Part
- type RawHeader
- type RawMessage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Address ¶
func ParseAddress ¶
type Attachment ¶
type DecodedAddress ¶
type DecodedAddress struct {
// contains filtered or unexported fields
}
func CreateDecodedAddress ¶
func CreateDecodedAddress(addr Address) DecodedAddress
func (DecodedAddress) Email ¶
func (da DecodedAddress) Email() string
func (DecodedAddress) Name ¶
func (da DecodedAddress) Name() string
func (DecodedAddress) String ¶
func (da DecodedAddress) String() string
type HeaderInfo ¶
type HeaderInfo struct {
FullHeaders HeaderList // all headers
}
type HeaderList ¶
func (HeaderList) Add ¶
func (h HeaderList) Add(key, value string)
func (HeaderList) Bcc ¶
func (h HeaderList) Bcc() []Address
func (HeaderList) Cc ¶
func (h HeaderList) Cc() []Address
func (HeaderList) Comments ¶
func (h HeaderList) Comments() []string
func (HeaderList) ContentType ¶
func (h HeaderList) ContentType() string
func (HeaderList) Date ¶
func (h HeaderList) Date() time.Time
func (HeaderList) FirstByKey ¶
func (h HeaderList) FirstByKey(key string) (string, bool)
func (HeaderList) From ¶
func (h HeaderList) From() []Address
func (HeaderList) InReply ¶
func (h HeaderList) InReply() []string
func (HeaderList) Keywords ¶
func (h HeaderList) Keywords() []string
func (HeaderList) MediaType ¶
func (h HeaderList) MediaType() MediaType
func (HeaderList) MessageId ¶
func (h HeaderList) MessageId() string
func (HeaderList) References ¶
func (h HeaderList) References() []string
func (HeaderList) ReplyTo ¶
func (h HeaderList) ReplyTo() []Address
func (HeaderList) Sender ¶
func (h HeaderList) Sender() Address
func (HeaderList) Set ¶
func (h HeaderList) Set(key string, value []string)
func (HeaderList) Subject ¶
func (h HeaderList) Subject() string
func (HeaderList) To ¶
func (h HeaderList) To() []Address
type MailboxAddr ¶
type MailboxAddr struct {
// contains filtered or unexported fields
}
func (MailboxAddr) Email ¶
func (ma MailboxAddr) Email() string
func (MailboxAddr) Name ¶
func (ma MailboxAddr) Name() string
func (MailboxAddr) String ¶
func (ma MailboxAddr) String() string
type Message ¶
type Message struct { HeaderInfo Body []byte Text string Html string Attachments []Attachment Parts []Part }
func Process ¶
func Process(r RawMessage) (m Message, e error)
type RawMessage ¶
func ParseRaw ¶
func ParseRaw(s []byte) (m RawMessage, e error)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.