Library
Module
Module type
Parameter
Class
Class type
Emile module, parser of e-mail address.
The local part of an e-mail address is composed by two kinds of words:
`Atom
is string as is.`String
is a string surrounded by double-quote to allow white-space.The second kind is sanitize - we deleted double-quote.
type local = word list
Local part of e-mail address.
Subset of domain described by RFC5321 which contains 3 kinds of address:
IPv4
: a valid IPv4 addressIPv6
: a valid IPv6 addressExt (ldh, value)
: an extended kind of domain recognized by ldh
identifier which valus is value
Parser of IPv4
and IPv6
was done by Ipaddr
. An extended kind Ext
need to be resolved by the client.
Domain part of e-mail address. A domain integrate kinds from RFC5321 (see addr
), a domain described by RFC5322 and a `Literal
which is the last best-effort value possible as a domain.
Emile
does not resolve domain.
A phrase is a sentence to associate a name with an e-mail address or a group of e-mail addresses. `Encoded
value is not normalized on the charset specified. The encoded's string is decoded as is only.
The Emile's set type which is a singleton or a set of e-mail addresses.
val pp_addr : addr Fmt.t
val pp_domain : domain Fmt.t
val pp_word : word Fmt.t
val pp_local : local Fmt.t
val pp_raw : raw Fmt.t
val pp_phrase : phrase Fmt.t
val pp_mailbox : mailbox Fmt.t
val pp_group : group Fmt.t
val pp_address : address Fmt.t
val pp_set : set Fmt.t
case_insensitive a b
maps values with lowercase_ascii
and compare them with String.compare
. We do not map UTF8 value.
equal_domains a b
apply equal_domain
to ordered domains (see compare_domain
) between a
and b
.
equal_mailbox ?case_sensitive a b
tests if mailbox
a
and mailbox
b
are semantically equal. The user can define if the local-part need to be case-sensitive or not (by case_sensitive
). If a
xor b
has a name, we consider a = b
if we have the same local-part and same domain(s). Otherwise, we compare identifier/phrase
between them.
compare ?case_sensitive a b
compares mailbox
a
and mailbxo
b
semantically. We prioritize local-part, domain-part and finally optionnal name.
module List : sig ... end