{"id":19674329,"url":"https://github.com/mirage/emile","last_synced_at":"2025-07-01T12:04:40.874Z","repository":{"id":50253393,"uuid":"120412647","full_name":"mirage/emile","owner":"mirage","description":"\u0026 images","archived":false,"fork":false,"pushed_at":"2025-01-08T12:56:54.000Z","size":582,"stargazers_count":32,"open_issues_count":0,"forks_count":2,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-06-30T11:19:48.736Z","etag":null,"topics":["e-mail","ocaml","parser","rfc2822","rfc5321","rfc5322","rfc822"],"latest_commit_sha":null,"homepage":"","language":"OCaml","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mirage.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2018-02-06T06:36:37.000Z","updated_at":"2025-01-08T12:56:56.000Z","dependencies_parsed_at":"2024-08-03T01:28:31.123Z","dependency_job_id":"82f1b076-4fcf-496d-b323-60be9f2da148","html_url":"https://github.com/mirage/emile","commit_stats":null,"previous_names":["dinosaure/emile"],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/mirage/emile","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mirage%2Femile","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mirage%2Femile/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mirage%2Femile/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mirage%2Femile/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mirage","download_url":"https://codeload.github.com/mirage/emile/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mirage%2Femile/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262959561,"owners_count":23391057,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["e-mail","ocaml","parser","rfc2822","rfc5321","rfc5322","rfc822"],"created_at":"2024-11-11T17:17:57.762Z","updated_at":"2025-07-01T12:04:40.845Z","avatar_url":"https://github.com/mirage.png","language":"OCaml","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Emile (\u0026 [Images](https://youtube.com/watch?v=S70NaQqAfaw))\n\n[![Build Status](https://travis-ci.org/dinosaure/emile.svg?branch=master)](https://travis-ci.org/dinosure/emile)\n![MirageOS](https://img.shields.io/badge/MirageOS-%F0%9F%90%AB-red.svg)\n\nEmile is a library to parse an e-mail address in OCaml. This project is an\nextraction of [mrmime](https://github.com/mirage/mrmime.git).\n\nThis implementation follow some RFCs:\n- [RFC 822](https://www.ietf.org/rfc/rfc822.txt)\n- [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt)\n- [RFC 5321](https://www.ietf.org/rfc/rfc5321.txt) (domain part)\n- [RFC 5322](https://www.ietf.org/rfc/rfc5322.txt)\n- [RFC 6532](https://www.ietf.org/rfc/rfc6532.txt)\n\nWe handle UTF-8 ([RFC 6532](https://www.ietf.org/rfc/rfc6532.txt)), domain\ndefined on the SMTP protocol ([RFC 5321](https://www.ietf.org/rfc/rfc5321.txt)),\nand general e-mail address purpose (RFC 822, RFC 2822, RFC 5322) __without__\n_folding-whitespace_.\n\n### Folding whitespace\n\nAccording RFC 822, an e-mail address into an e-mail can be splitted by a\n_folding-whitespace_. However, this kind of form is not an usual case where user\nmostly wants to parse input from a form (for example). At the end, `emile` is\nnot able to parse this kind of input:\n\n```\nA Group(Some people)\n   :Chris Jones \u003cc@(Chris's host.)public.example\u003e,\n     joe@example.org,\n John \u003cjdoe@one.test\u003e (my dear friend); (the end of the group)\"\n```\n\nHowever, a pre-process (like\n[unstrctrd](https://github.com/dinosaure/unstrctrd)) can _fold_ input and give\nyou an usual output. `emile` can not be used into an e-mail context without this\nkind of pre-process.\n\n### Domain\n\nThen, for domain part (explained on RFC 5321 - SMTP protocol), we handle this\nkind of domain (IPv4 and IPv6 domain) with\n[ipaddr](https://github.com/mirage/ipaddr.git):\n\n```\nfirst.last@[12.34.56.78]\nfirst.last@[IPv6:1111:2222:3333::4444:12.34.56.78]\n```\n\nIt's possible to notify multiple domains for one local-part like this:\n \n```\n\u003c@a.com,b.com:john@doe.com\u003e\n```\n\nIt's a valid form according [RFC 882](https://www.ietf.org/rfc/rfc822.txt).\n\n### Comments\n\nEven if we don't handle the _folding-whitespace_, we are able to discard\ncomments.\n\n```\na(a(b(c)d(e(f))g)h(i)j)@iana.org\n```\n\n## Advise\n\nIf you think it's easy to parse an e-mail address, you should look\n[tests](https://github.com/mirage/emile/blob/master/test/test.ml).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmirage%2Femile","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmirage%2Femile","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmirage%2Femile/lists"}