.github/workflows | ||
src | ||
test | ||
.gitignore | ||
gleam.toml | ||
LICENSE | ||
manifest.toml | ||
README.md |
mbox
Parse mbox files in Gleam.
WARNING: This library is a personal project to learn Gleam. It is extremely incomplete, barely works, highly un - optimized, and is NOT guaranteed to work, in present or future. I do intend to make it useable and utilise in another project, but right now, if you use it and it breaks stuff, you get to keep all the pieces. Be warned and prosper.
That said, there are multiple specs pertaining to the Internet Mail format (thanks to collect them in one place, mrmime):
- RFC822: Standard For The Format of ARPA Internet Text Messages
- RFC2822: Internet Message Format
- RFC5321: Simple Mail Transfer Protocol
- RFC5322: Internet Message Format
- RFC2045: MIME Part One: Format of Internet Message Bodies
- RFC2046: MIME Part Two: Media Types
- RFC2047: MIME Part Three: Message-Header Extensions for Non-ASCII Text
- RFC2049: MIME Part Five: Conformance Criteria and Examples
- RFC6532: Internationalized Email Headers
So far, there is some progress with RFC 822, RFC2822 and RFC 4155. Vast majority of the spec of these RFCs and ALL of the rest of RFCs is yet to be implemented.
The codebase is in flux, as I continue to learn Gleam and get a hang of things, so beware before depending on this lib for anything serious. I am, however, open for suggestions on everything in here, so feel free to reach out by creating an issue or PR.
gleam add mbox
TODOs:
- Add example
- Better error propagation
- Handle multi-part MIME messages
Further documentation can be found at https://hexdocs.pm/gleambox.
Development
gleam run # Run the project
gleam test # Run the tests
gleam shell # Run an Erlang shell