package emile

Build not checked
  1. Overview
  2. Docs
Parser of email address according RFC 822

Install

dune-project
 Dependency

Authors

Maintainers

Sources

emile-v0.7.tbz
sha256=f084d5f6f27b327f17cbdccf27374a0d3dcaedd25e5ffa1611d0e7542a658c73
sha512=02619876d14abd9f986c9c86079b4258f15d2134692bff6b06a88b0a204d053972359234ed5071a748fcd796889d91c489edd2064762a326f2cb6f740e40d868

Description

Added to opam-repository:

README

Emile (& Images)

Build Status MirageOS

Emile is a library to parse an e-mail address in OCaml. This project is an extraction of mrmime.

This implementation follow some RFCs:

We handle UTF-8 (RFC 6532), domain defined on the SMTP protocol (RFC 5321), and general e-mail address purpose (RFC 822, RFC 2822, RFC 5322) without folding-whitespace.

Folding whitespace

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, emile is not able to parse this kind of input:

A Group(Some people)
   :Chris Jones <c@(Chris's host.)public.example>,
     joe@example.org,
 John <jdoe@one.test> (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.

Domain

Then, for domain part (explained on RFC 5321 - SMTP protocol), we handle this kind of domain (IPv4 and IPv6 domain) with ipaddr:

first.last@[12.34.56.78]
first.last@[IPv6:1111:2222:3333::4444:12.34.56.78]

It's possible to notify multiple domains for one local-part like this:

<@a.com,b.com:john@doe.com>

It's a valid form according RFC 882.

Comments

Even if we don't handle the folding-whitespace, we are able to discard comments.

a(a(b(c)d(e(f))g)h(i)j)@iana.org

Advise

If you think it's easy to parse an e-mail address, you should look tests.

Dependencies (9)

  1. fmt >= "0.8.0"
  2. uutf >= "1.0.0"
  3. bigstringaf >= "0.2.0"
  4. pecu >= "0.3"
  5. base64 >= "3.0.0"
  6. ipaddr >= "2.7.0"
  7. angstrom >= "0.10.0" & < "0.14.0"
  8. dune >= "1.0"
  9. ocaml >= "4.03.0"

Dev Dependencies (1)

  1. alcotest with-test

Optional Dependencies (1)

  1. cmdliner

Used by (2)

  1. colombe >= "0.13.0"
  2. letters = "0.1.1"

Conflicts

None

Build status

Results of building emile with each compiler on check.ci.ocaml.org, run of against opam-repository 78c202b. All results for this package.

Each result links to its build log. To keep crawlers from overloading the site, build logs require a GitHub sign-in (see ocurrent/opam-health-check). On your first log, GitHub asks you to “Authorize opam-health-check”, the OCurrent app that runs these checks; it sees only your public profile, not your repositories. The sign-in lasts 30 days.

This version is not in the latest run; the versions below are.

Version OCaml 4.11 OCaml 4.14 OCaml 5.2 OCaml 5.4 OCaml 5.5
1.1 good good good good good
  • good Package successfully built
  • partial One of the dependencies failed to build
  • bad Package failed to build
  • n/a Package is not available in this environment
  • internal Internal failure