Emile is a library to parse an e-mail address in OCaml. This project is an
extraction of mrmime.
This implementation follow some RFCs:
According RFC 822, an e-mail address into an e-mail can be splitted by a
folding-whitespace. However, this kind of form is not an usual case where user
mostly wants to parse input from a form (for example). At the end,
not able to parse this kind of input:
A Group(Some people) :Chris Jones <c@(Chris's host.)public.example>, firstname.lastname@example.org, John <email@example.com> (my dear friend); (the end of the group)"
However, a pre-process (like
unstrctrd) can fold input and give
you an usual output.
emile can not be used into an e-mail context without this
kind of pre-process.
Then, for domain part (explained on RFC 5321 - SMTP protocol), we handle this
kind of domain (IPv4 and IPv6 domain) with
It's possible to notify multiple domains for one local-part like this:
It's a valid form according RFC 882.
Even if we don't handle the folding-whitespace, we are able to discard
If you think it's easy to parse an e-mail address, you should look
>= "0.10.0" & < "0.14.0"