An email address and the name that came with it.
Letterbox.Address.parse_list(~s("Martínez, José" <jose+photos@Example.com>, ana@example.com))
#=> [%Letterbox.Address{name: "Martínez, José", address: "jose+photos@example.com"},
# %Letterbox.Address{name: nil, address: "ana@example.com"}]The domain is in lowercase; the local part stays as it came (RFC 5321
lets a server tell Ana from ana, though few do: local/1 and
matches?/2 compare it in lowercase). A sub-address, the part after
+ (jose+photos@), is tag/1.
Lists are read as mail clients write them: names quoted or not, with
encoded words (=?utf-8?Q?Jos=C3=A9?=), comments (ana@example.com (Ana), a name when there is no other), groups (Team: a@x, b@x;,
undisclosed-recipients:;), and commas inside quotes.
Summary
Functions
The address without its sub-address, in lowercase: photos@in.example.com.
The domain, after the @.
The local part, before the @, in lowercase.
Whether the address is other (an address, as a string or a struct),
in lowercase, and with or without a sub-address when other has none.
The first address of a header's value, or nil.
The addresses of a header's value (From, To, Cc, …), in their order.
The sub-address: what follows the first + of the local part
(photos+abc123@ gives "abc123"), or nil.
Types
Functions
The address without its sub-address, in lowercase: photos@in.example.com.
The domain, after the @.
The local part, before the @, in lowercase.
Whether the address is other (an address, as a string or a struct),
in lowercase, and with or without a sub-address when other has none.
The first address of a header's value, or nil.
The addresses of a header's value (From, To, Cc, …), in their order.
The sub-address: what follows the first + of the local part
(photos+abc123@ gives "abc123"), or nil.