An AddressList encapsulates a list of parsed RFC 2822 addresses.
There are no implemented interfaces.
There are no attributes in this class.
getaddress()
Parse the next address.
getaddrlist()
Parse all addresses.
Returns a list containing all of the addresses.
getaddrspec()
Parse an RFC 2822 addr-spec.
getatom(atomends=None)
Parse an RFC 2822 atom.
Optional atomends specifies a different set of end token delimiters (the default is to use self.atomends). This is used e.g. in getphraselist() since phrase endings must not include the `.' (which is legal in phrases).
getcomment()
Get a parenthesis-delimited fragment from self's field.
getdelimited(beginchar, endchars, allowcomments=1)
Parse a header fragment delimited by special characters.
`beginchar' is the start character for the fragment. If self is not looking at an instance of `beginchar' then getdelimited returns the empty string.
`endchars' is a sequence of allowable end-delimiting characters. Parsing stops when one of these is encountered.
If `allowcomments' is non-zero, embedded RFC 2822 comments are allowed within the parsed fragment.
getdomain()
Get the complete domain name from an address.
getdomainliteral()
Parse an RFC 2822 domain-literal.
getphraselist()
Parse a sequence of RFC 2822 phrases.
A phrase is a sequence of words, which are in turn either RFC 2822 atoms or quoted-strings. Phrases are canonicalized by squeezing all runs of continuous whitespace into one space.
getquote()
Get a quote-delimited fragment from self's field.
getrouteaddr()
Parse a route address (Return-path value).
This method just skips all the route stuff and returns the addrspec.
gotonext()
Parse up to the start of the next address.
There are no known subclasses.