An open API service indexing awesome lists of open source software.

https://github.com/davidvujic/clojure-email-experiment

Experimenting with parsing email files using Clojure
https://github.com/davidvujic/clojure-email-experiment

clojure email parsing

Last synced: 3 days ago
JSON representation

Experimenting with parsing email files using Clojure

Awesome Lists containing this project

README

          

### clojure-email-experiment

This repo has evolved into a `Clojure` library downloadable at `Clojars` and is now maintained in a different repo:
https://github.com/DavidVujic/email-attachments

Experimenting with parsing an email file using Clojure.

#### Usage

Example, extract an attached CSV file from an email and extract the content as a stream:

``` clojure

(->> "my_email_file.eml"
io/input-stream
email/content-types
(filter email/csv?)
first
email/content-stream)
```

#### References
Got a lot of inspiration and ideas from these repositories:

* [clojure-mail](https://github.com/owainlewis/clojure-mail)
* [simple-email](https://github.com/kisom/simple-email)

Useful Java docs:
* https://docs.oracle.com/javaee/6/api/javax/mail/internet/MimeMessage.html
* https://commons.apache.org/proper/commons-email/apidocs/org/apache/commons/mail/util/MimeMessageParser.html