package email_message

All checked builds pass
  1. Overview
  2. Docs

Description

Added to opam-repository:

README

"Email Message"

email_message is a library that defines types that represent an RFC2822 email.

Parsing an email

You can use Email.of_string to parse an email (e.g. from a ".eml" file).

Once you have your hands on an Email.t, you can use various functions in the Email.Simple and Email modules to inspect parts of the email. For example:

  • Email.Simple.subject : the subject of the email
  • Email.Simple.from : the From header sender of the email
  • Email.headers : all the email headers
  • Email.Simple.all_attachments the email attachments

Constructing an email

The Email.Simple module exposes various functions for constructing an email. For example:

Email.Simple.create
  ~from:(Email_address.of_string "sender@example.com")
  ~to_:[ (Email_address.of_string "recipient@example.com") ]
  ~subject:"Example email"
  (Email.Simple.Content.text_utf8 "This is an example email.")

Dependencies (12)

  1. magic-mime
  2. dune >= "3.11.0"
  3. cryptokit >= "1.16" & < "1.17"
  4. base64 >= "3.4.0"
  5. angstrom >= "0.15.0"
  6. re2 >= "v0.17" & < "v0.18~"
  7. ppx_jane >= "v0.17" & < "v0.18~"
  8. core_unix >= "v0.17" & < "v0.18~"
  9. core_kernel >= "v0.17" & < "v0.18~"
  10. core >= "v0.17" & < "v0.18~"
  11. async >= "v0.17" & < "v0.18~"
  12. ocaml >= "5.1.0"

Dev Dependencies

None

Optional Dependencies

None

Used by (1)

  1. async_smtp >= "v0.17.0"

Conflicts

None

Build status

Results of building email_message with each compiler on check.ci.ocaml.org, run of against opam-repository 8a77e58. 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.

Version OCaml 4.11 OCaml 4.14 OCaml 5.2 OCaml 5.4 OCaml 5.5
v0.17.0 (this version) n/a n/a good good good
v0.16.0 n/a good good n/a n/a
v0.15.0 good good n/a n/a n/a
  • 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