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 ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Address ¶
func ParseAddress ¶
type Attachment ¶
type HeaderInfo ¶
type HeaderInfo struct {
FullHeaders []Header // all headers
OptHeaders []Header // unprocessed headers
MessageId string
Id string
Date time.Time
From []Address
Sender Address
ReplyTo []Address
To []Address
Cc []Address
Bcc []Address
Subject string
Comments []string
Keywords []string
ContentType string
InReply []string
References []string
}
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)
Click to show internal directories.
Click to hide internal directories.