package emile
Module EmileSource
Emile module, parser of e-mail address.
The local part of an e-mail address is composed by two kinds of words:
`Atomis string as is.`Stringis a string surrounded by double-quote to allow white-space.
The second kind is sanitize - we deleted double-quote.
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 byldhidentifier which valus isvalue
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.
Pretty-printer
Equal & Compare
Alias of String.compare.
case_insensitive a b maps values with lowercase_ascii and compare them with String.compare. We do not map UTF8 value.
equal_addr a b tests if addr a and addr b are semantically equal. An IPv4 should be equal with an IPv6 address. Then, for extended kind, we strictly compare (Pervasives.compare) kind and 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.