Documentation
¶
Overview ¶
Package mail implements parsing of mail messages.
For the most part, this package follows the syntax as specified by RFC 5322. Notable divergences:
- Obsolete address formats are not parsed, including addresses with embedded route information.
- Group addresses are not parsed.
- The full range of spacing (the CFWS syntax element) is not supported, such as breaking addresses across lines.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrHeaderNotPresent = errors.New("mail: header not in message")
Functions ¶
This section is empty.
Types ¶
type Address ¶
Address represents a single mail address. An address such as "Barry Gibbs <[email protected]>" is represented as Address{Name: "Barry Gibbs", Address: "[email protected]"}.
func ParseAddress ¶ added in go1.1
Parses a single RFC 5322 address, e.g. "Barry Gibbs <[email protected]>"
func ParseAddressList ¶ added in go1.1
ParseAddressList parses the given string as a list of addresses.
type Header ¶
A Header represents the key-value pairs in a mail message header.
func (Header) AddressList ¶
AddressList parses the named header field as a list of addresses.
Click to show internal directories.
Click to hide internal directories.